/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 4.0.2
 *
 * This file is not intended to be easily readable and contains a number of
 * coding conventions designed to improve portability and efficiency. Do not make
 * changes to this file unless you know what you are doing--modify the SWIG
 * interface file instead.
 * ----------------------------------------------------------------------------- */


#ifndef SWIGPYTHON
#define SWIGPYTHON
#endif

#define SWIG_PYTHON_DIRECTOR_NO_VTABLE


#ifdef __cplusplus
/* SwigValueWrapper is described in swig.swg */
template<typename T> class SwigValueWrapper {
  struct SwigMovePointer {
    T *ptr;
    SwigMovePointer(T *p) : ptr(p) { }
    ~SwigMovePointer() { delete ptr; }
    SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
  } pointer;
  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
public:
  SwigValueWrapper() : pointer(0) { }
  SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
  operator T&() const { return *pointer.ptr; }
  T *operator&() { return pointer.ptr; }
};

template <typename T> T SwigValueInit() {
  return T();
}
#endif

/* -----------------------------------------------------------------------------
 *  This section contains generic SWIG labels for method/variable
 *  declarations/attributes, and other compiler dependent labels.
 * ----------------------------------------------------------------------------- */

/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
#  define SWIGTEMPLATEDISAMBIGUATOR template
# elif defined(__HP_aCC)
/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
#  define SWIGTEMPLATEDISAMBIGUATOR template
# else
#  define SWIGTEMPLATEDISAMBIGUATOR
# endif
#endif

/* inline attribute */
#ifndef SWIGINLINE
# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
#   define SWIGINLINE inline
# else
#   define SWIGINLINE
# endif
#endif

/* attribute recognised by some compilers to avoid 'unused' warnings */
#ifndef SWIGUNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define SWIGUNUSED __attribute__ ((__unused__))
#   else
#     define SWIGUNUSED
#   endif
# elif defined(__ICC)
#   define SWIGUNUSED __attribute__ ((__unused__))
# else
#   define SWIGUNUSED
# endif
#endif

#ifndef SWIG_MSC_UNSUPPRESS_4505
# if defined(_MSC_VER)
#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
# endif
#endif

#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
#   define SWIGUNUSEDPARM(p)
# else
#   define SWIGUNUSEDPARM(p) p SWIGUNUSED
# endif
#endif

/* internal SWIG method */
#ifndef SWIGINTERN
# define SWIGINTERN static SWIGUNUSED
#endif

/* internal inline SWIG method */
#ifndef SWIGINTERNINLINE
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif

/* exporting methods */
#if defined(__GNUC__)
#  if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#    ifndef GCC_HASCLASSVISIBILITY
#      define GCC_HASCLASSVISIBILITY
#    endif
#  endif
#endif

#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   if defined(STATIC_LINKED)
#     define SWIGEXPORT
#   else
#     define SWIGEXPORT __declspec(dllexport)
#   endif
# else
#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
#     define SWIGEXPORT __attribute__ ((visibility("default")))
#   else
#     define SWIGEXPORT
#   endif
# endif
#endif

/* calling conventions for Windows */
#ifndef SWIGSTDCALL
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   define SWIGSTDCALL __stdcall
# else
#   define SWIGSTDCALL
# endif
#endif

/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE
#endif

/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
# define _SCL_SECURE_NO_DEPRECATE
#endif

/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
#endif

/* Intel's compiler complains if a variable which was never initialised is
 * cast to void, which is a common idiom which we use to indicate that we
 * are aware a variable isn't used.  So we just silence that warning.
 * See: https://github.com/swig/swig/issues/192 for more discussion.
 */
#ifdef __INTEL_COMPILER
# pragma warning disable 592
#endif


#if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND)
/* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */
# include <math.h>
#endif

#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
/* Use debug wrappers with the Python release dll */
# undef _DEBUG
# include <Python.h>
# define _DEBUG 1
#else
# include <Python.h>
#endif

/* -----------------------------------------------------------------------------
 * swigrun.swg
 *
 * This file contains generic C API SWIG runtime support for pointer
 * type checking.
 * ----------------------------------------------------------------------------- */

/* This should only be incremented when either the layout of swig_type_info changes,
   or for whatever reason, the runtime changes incompatibly */
#define SWIG_RUNTIME_VERSION "4"

/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
#ifdef SWIG_TYPE_TABLE
# define SWIG_QUOTE_STRING(x) #x
# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
#else
# define SWIG_TYPE_TABLE_NAME
#endif

/*
  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
  creating a static or dynamic library from the SWIG runtime code.
  In 99.9% of the cases, SWIG just needs to declare them as 'static'.

  But only do this if strictly necessary, ie, if you have problems
  with your compiler or suchlike.
*/

#ifndef SWIGRUNTIME
# define SWIGRUNTIME SWIGINTERN
#endif

#ifndef SWIGRUNTIMEINLINE
# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
#endif

/*  Generic buffer size */
#ifndef SWIG_BUFFER_SIZE
# define SWIG_BUFFER_SIZE 1024
#endif

/* Flags for pointer conversions */
#define SWIG_POINTER_DISOWN        0x1
#define SWIG_CAST_NEW_MEMORY       0x2
#define SWIG_POINTER_NO_NULL       0x4

/* Flags for new pointer objects */
#define SWIG_POINTER_OWN           0x1


/*
   Flags/methods for returning states.

   The SWIG conversion methods, as ConvertPtr, return an integer
   that tells if the conversion was successful or not. And if not,
   an error code can be returned (see swigerrors.swg for the codes).

   Use the following macros/flags to set or process the returning
   states.

   In old versions of SWIG, code such as the following was usually written:

     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
       // success code
     } else {
       //fail code
     }

   Now you can be more explicit:

    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
    if (SWIG_IsOK(res)) {
      // success code
    } else {
      // fail code
    }

   which is the same really, but now you can also do

    Type *ptr;
    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
    if (SWIG_IsOK(res)) {
      // success code
      if (SWIG_IsNewObj(res) {
        ...
	delete *ptr;
      } else {
        ...
      }
    } else {
      // fail code
    }

   I.e., now SWIG_ConvertPtr can return new objects and you can
   identify the case and take care of the deallocation. Of course that
   also requires SWIG_ConvertPtr to return new result values, such as

      int SWIG_ConvertPtr(obj, ptr,...) {
        if (<obj is ok>) {
          if (<need new object>) {
            *ptr = <ptr to new allocated object>;
            return SWIG_NEWOBJ;
          } else {
            *ptr = <ptr to old object>;
            return SWIG_OLDOBJ;
          }
        } else {
          return SWIG_BADOBJ;
        }
      }

   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
   SWIG errors code.

   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
   allows to return the 'cast rank', for example, if you have this

       int food(double)
       int fooi(int);

   and you call

      food(1)   // cast rank '1'  (1 -> 1.0)
      fooi(1)   // cast rank '0'

   just use the SWIG_AddCast()/SWIG_CheckState()
*/

#define SWIG_OK                    (0)
#define SWIG_ERROR                 (-1)
#define SWIG_IsOK(r)               (r >= 0)
#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)

/* The CastRankLimit says how many bits are used for the cast rank */
#define SWIG_CASTRANKLIMIT         (1 << 8)
/* The NewMask denotes the object was created (using new/malloc) */
#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
/* The TmpMask is for in/out typemaps that use temporal objects */
#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
/* Simple returning values */
#define SWIG_BADOBJ                (SWIG_ERROR)
#define SWIG_OLDOBJ                (SWIG_OK)
#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
/* Check, add and del mask methods */
#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))

/* Cast-Rank Mode */
#if defined(SWIG_CASTRANK_MODE)
#  ifndef SWIG_TypeRank
#    define SWIG_TypeRank             unsigned long
#  endif
#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
#    define SWIG_MAXCASTRANK          (2)
#  endif
#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
#  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
SWIGINTERNINLINE int SWIG_AddCast(int r) {
  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
}
SWIGINTERNINLINE int SWIG_CheckState(int r) {
  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
}
#else /* no cast-rank mode */
#  define SWIG_AddCast(r) (r)
#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
#endif


#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef void *(*swig_converter_func)(void *, int *);
typedef struct swig_type_info *(*swig_dycast_func)(void **);

/* Structure to store information on one type */
typedef struct swig_type_info {
  const char             *name;			/* mangled name of this type */
  const char             *str;			/* human readable name of this type */
  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
  void                   *clientdata;		/* language specific type data */
  int                    owndata;		/* flag if the structure owns the clientdata */
} swig_type_info;

/* Structure to store a type and conversion function used for casting */
typedef struct swig_cast_info {
  swig_type_info         *type;			/* pointer to type that is equivalent to this type */
  swig_converter_func     converter;		/* function to cast the void pointers */
  struct swig_cast_info  *next;			/* pointer to next cast in linked list */
  struct swig_cast_info  *prev;			/* pointer to the previous cast */
} swig_cast_info;

/* Structure used to store module information
 * Each module generates one structure like this, and the runtime collects
 * all of these structures and stores them in a circularly linked list.*/
typedef struct swig_module_info {
  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
  size_t                 size;		        /* Number of types in this module */
  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
  swig_type_info         **type_initial;	/* Array of initially generated type structures */
  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
  void                    *clientdata;		/* Language specific module data */
} swig_module_info;

/*
  Compare two type names skipping the space characters, therefore
  "char*" == "char *" and "Class<int>" == "Class<int >", etc.

  Return 0 when the two name types are equivalent, as in
  strncmp, but skipping ' '.
*/
SWIGRUNTIME int
SWIG_TypeNameComp(const char *f1, const char *l1,
		  const char *f2, const char *l2) {
  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
    while ((*f1 == ' ') && (f1 != l1)) ++f1;
    while ((*f2 == ' ') && (f2 != l2)) ++f2;
    if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
  }
  return (int)((l1 - f1) - (l2 - f2));
}

/*
  Check type equivalence in a name list like <name1>|<name2>|...
  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
*/
SWIGRUNTIME int
SWIG_TypeCmp(const char *nb, const char *tb) {
  int equiv = 1;
  const char* te = tb + strlen(tb);
  const char* ne = nb;
  while (equiv != 0 && *ne) {
    for (nb = ne; *ne; ++ne) {
      if (*ne == '|') break;
    }
    equiv = SWIG_TypeNameComp(nb, ne, tb, te);
    if (*ne) ++ne;
  }
  return equiv;
}

/*
  Check type equivalence in a name list like <name1>|<name2>|...
  Return 0 if not equal, 1 if equal
*/
SWIGRUNTIME int
SWIG_TypeEquiv(const char *nb, const char *tb) {
  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
}

/*
  Check the typename
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char *c, swig_type_info *ty) {
  if (ty) {
    swig_cast_info *iter = ty->cast;
    while (iter) {
      if (strcmp(iter->type->name, c) == 0) {
        if (iter == ty->cast)
          return iter;
        /* Move iter to the top of the linked list */
        iter->prev->next = iter->next;
        if (iter->next)
          iter->next->prev = iter->prev;
        iter->next = ty->cast;
        iter->prev = 0;
        if (ty->cast) ty->cast->prev = iter;
        ty->cast = iter;
        return iter;
      }
      iter = iter->next;
    }
  }
  return 0;
}

/*
  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
  if (ty) {
    swig_cast_info *iter = ty->cast;
    while (iter) {
      if (iter->type == from) {
        if (iter == ty->cast)
          return iter;
        /* Move iter to the top of the linked list */
        iter->prev->next = iter->next;
        if (iter->next)
          iter->next->prev = iter->prev;
        iter->next = ty->cast;
        iter->prev = 0;
        if (ty->cast) ty->cast->prev = iter;
        ty->cast = iter;
        return iter;
      }
      iter = iter->next;
    }
  }
  return 0;
}

/*
  Cast a pointer up an inheritance hierarchy
*/
SWIGRUNTIMEINLINE void *
SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
}

/*
   Dynamic pointer casting. Down an inheritance hierarchy
*/
SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
  swig_type_info *lastty = ty;
  if (!ty || !ty->dcast) return ty;
  while (ty && (ty->dcast)) {
    ty = (*ty->dcast)(ptr);
    if (ty) lastty = ty;
  }
  return lastty;
}

/*
  Return the name associated with this type
*/
SWIGRUNTIMEINLINE const char *
SWIG_TypeName(const swig_type_info *ty) {
  return ty->name;
}

/*
  Return the pretty name associated with this type,
  that is an unmangled type name in a form presentable to the user.
*/
SWIGRUNTIME const char *
SWIG_TypePrettyName(const swig_type_info *type) {
  /* The "str" field contains the equivalent pretty names of the
     type, separated by vertical-bar characters.  We choose
     to print the last name, as it is often (?) the most
     specific. */
  if (!type) return NULL;
  if (type->str != NULL) {
    const char *last_name = type->str;
    const char *s;
    for (s = type->str; *s; s++)
      if (*s == '|') last_name = s+1;
    return last_name;
  }
  else
    return type->name;
}

/*
   Set the clientdata field for a type
*/
SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
  swig_cast_info *cast = ti->cast;
  /* if (ti->clientdata == clientdata) return; */
  ti->clientdata = clientdata;

  while (cast) {
    if (!cast->converter) {
      swig_type_info *tc = cast->type;
      if (!tc->clientdata) {
	SWIG_TypeClientData(tc, clientdata);
      }
    }
    cast = cast->next;
  }
}
SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
  SWIG_TypeClientData(ti, clientdata);
  ti->owndata = 1;
}

/*
  Search for a swig_type_info structure only by mangled name
  Search is a O(log #types)

  We start searching at module start, and finish searching when start == end.
  Note: if start == end at the beginning of the function, we go all the way around
  the circular list.
*/
SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info *start,
                            swig_module_info *end,
		            const char *name) {
  swig_module_info *iter = start;
  do {
    if (iter->size) {
      size_t l = 0;
      size_t r = iter->size - 1;
      do {
	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
	size_t i = (l + r) >> 1;
	const char *iname = iter->types[i]->name;
	if (iname) {
	  int compare = strcmp(name, iname);
	  if (compare == 0) {
	    return iter->types[i];
	  } else if (compare < 0) {
	    if (i) {
	      r = i - 1;
	    } else {
	      break;
	    }
	  } else if (compare > 0) {
	    l = i + 1;
	  }
	} else {
	  break; /* should never happen */
	}
      } while (l <= r);
    }
    iter = iter->next;
  } while (iter != end);
  return 0;
}

/*
  Search for a swig_type_info structure for either a mangled name or a human readable name.
  It first searches the mangled names of the types, which is a O(log #types)
  If a type is not found it then searches the human readable names, which is O(#types).

  We start searching at module start, and finish searching when start == end.
  Note: if start == end at the beginning of the function, we go all the way around
  the circular list.
*/
SWIGRUNTIME swig_type_info *
SWIG_TypeQueryModule(swig_module_info *start,
                     swig_module_info *end,
		     const char *name) {
  /* STEP 1: Search the name field using binary search */
  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
  if (ret) {
    return ret;
  } else {
    /* STEP 2: If the type hasn't been found, do a complete search
       of the str field (the human readable name) */
    swig_module_info *iter = start;
    do {
      size_t i = 0;
      for (; i < iter->size; ++i) {
	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
	  return iter->types[i];
      }
      iter = iter->next;
    } while (iter != end);
  }

  /* neither found a match */
  return 0;
}

/*
   Pack binary data into a string
*/
SWIGRUNTIME char *
SWIG_PackData(char *c, void *ptr, size_t sz) {
  static const char hex[17] = "0123456789abcdef";
  const unsigned char *u = (unsigned char *) ptr;
  const unsigned char *eu =  u + sz;
  for (; u != eu; ++u) {
    unsigned char uu = *u;
    *(c++) = hex[(uu & 0xf0) >> 4];
    *(c++) = hex[uu & 0xf];
  }
  return c;
}

/*
   Unpack binary data from a string
*/
SWIGRUNTIME const char *
SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
  unsigned char *u = (unsigned char *) ptr;
  const unsigned char *eu = u + sz;
  for (; u != eu; ++u) {
    char d = *(c++);
    unsigned char uu;
    if ((d >= '0') && (d <= '9'))
      uu = (unsigned char)((d - '0') << 4);
    else if ((d >= 'a') && (d <= 'f'))
      uu = (unsigned char)((d - ('a'-10)) << 4);
    else
      return (char *) 0;
    d = *(c++);
    if ((d >= '0') && (d <= '9'))
      uu |= (unsigned char)(d - '0');
    else if ((d >= 'a') && (d <= 'f'))
      uu |= (unsigned char)(d - ('a'-10));
    else
      return (char *) 0;
    *u = uu;
  }
  return c;
}

/*
   Pack 'void *' into a string buffer.
*/
SWIGRUNTIME char *
SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
  char *r = buff;
  if ((2*sizeof(void *) + 2) > bsz) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r,&ptr,sizeof(void *));
  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
  strcpy(r,name);
  return buff;
}

SWIGRUNTIME const char *
SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
  if (*c != '_') {
    if (strcmp(c,"NULL") == 0) {
      *ptr = (void *) 0;
      return name;
    } else {
      return 0;
    }
  }
  return SWIG_UnpackData(++c,ptr,sizeof(void *));
}

SWIGRUNTIME char *
SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
  char *r = buff;
  size_t lname = (name ? strlen(name) : 0);
  if ((2*sz + 2 + lname) > bsz) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r,ptr,sz);
  if (lname) {
    strncpy(r,name,lname+1);
  } else {
    *r = 0;
  }
  return buff;
}

SWIGRUNTIME const char *
SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
  if (*c != '_') {
    if (strcmp(c,"NULL") == 0) {
      memset(ptr,0,sz);
      return name;
    } else {
      return 0;
    }
  }
  return SWIG_UnpackData(++c,ptr,sz);
}

#ifdef __cplusplus
}
#endif

/*  Errors in SWIG */
#define  SWIG_UnknownError    	   -1
#define  SWIG_IOError        	   -2
#define  SWIG_RuntimeError   	   -3
#define  SWIG_IndexError     	   -4
#define  SWIG_TypeError      	   -5
#define  SWIG_DivisionByZero 	   -6
#define  SWIG_OverflowError  	   -7
#define  SWIG_SyntaxError    	   -8
#define  SWIG_ValueError     	   -9
#define  SWIG_SystemError    	   -10
#define  SWIG_AttributeError 	   -11
#define  SWIG_MemoryError    	   -12
#define  SWIG_NullReferenceError   -13



/* Compatibility macros for Python 3 */
#if PY_VERSION_HEX >= 0x03000000

#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
#define PyInt_Check(x) PyLong_Check(x)
#define PyInt_AsLong(x) PyLong_AsLong(x)
#define PyInt_FromLong(x) PyLong_FromLong(x)
#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
#define PyString_Check(name) PyBytes_Check(name)
#define PyString_FromString(x) PyUnicode_FromString(x)
#define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
#define PyString_AsString(str) PyBytes_AsString(str)
#define PyString_Size(str) PyBytes_Size(str)	
#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)

#endif

#ifndef Py_TYPE
#  define Py_TYPE(op) ((op)->ob_type)
#endif

/* SWIG APIs for compatibility of both Python 2 & 3 */

#if PY_VERSION_HEX >= 0x03000000
#  define SWIG_Python_str_FromFormat PyUnicode_FromFormat
#else
#  define SWIG_Python_str_FromFormat PyString_FromFormat
#endif


/* Warning: This function will allocate a new string in Python 3,
 * so please call SWIG_Python_str_DelForPy3(x) to free the space.
 */
SWIGINTERN char*
SWIG_Python_str_AsChar(PyObject *str)
{
#if PY_VERSION_HEX >= 0x03030000
  return (char *)PyUnicode_AsUTF8(str);
#elif PY_VERSION_HEX >= 0x03000000
  char *newstr = 0;
  str = PyUnicode_AsUTF8String(str);
  if (str) {
    char *cstr;
    Py_ssize_t len;
    if (PyBytes_AsStringAndSize(str, &cstr, &len) != -1) {
      newstr = (char *) malloc(len+1);
      if (newstr)
        memcpy(newstr, cstr, len+1);
    }
    Py_XDECREF(str);
  }
  return newstr;
#else
  return PyString_AsString(str);
#endif
}

#if PY_VERSION_HEX >= 0x03030000 || PY_VERSION_HEX < 0x03000000
#  define SWIG_Python_str_DelForPy3(x)
#else
#  define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
#endif


SWIGINTERN PyObject*
SWIG_Python_str_FromChar(const char *c)
{
#if PY_VERSION_HEX >= 0x03000000
  return PyUnicode_FromString(c); 
#else
  return PyString_FromString(c);
#endif
}

#ifndef PyObject_DEL
# define PyObject_DEL PyObject_Del
#endif

// SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user
// interface files check for it.
# define SWIGPY_USE_CAPSULE
# define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)

#if PY_VERSION_HEX < 0x03020000
#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
#define Py_hash_t long
#endif

/* -----------------------------------------------------------------------------
 * error manipulation
 * ----------------------------------------------------------------------------- */

SWIGRUNTIME PyObject*
SWIG_Python_ErrorType(int code) {
  PyObject* type = 0;
  switch(code) {
  case SWIG_MemoryError:
    type = PyExc_MemoryError;
    break;
  case SWIG_IOError:
    type = PyExc_IOError;
    break;
  case SWIG_RuntimeError:
    type = PyExc_RuntimeError;
    break;
  case SWIG_IndexError:
    type = PyExc_IndexError;
    break;
  case SWIG_TypeError:
    type = PyExc_TypeError;
    break;
  case SWIG_DivisionByZero:
    type = PyExc_ZeroDivisionError;
    break;
  case SWIG_OverflowError:
    type = PyExc_OverflowError;
    break;
  case SWIG_SyntaxError:
    type = PyExc_SyntaxError;
    break;
  case SWIG_ValueError:
    type = PyExc_ValueError;
    break;
  case SWIG_SystemError:
    type = PyExc_SystemError;
    break;
  case SWIG_AttributeError:
    type = PyExc_AttributeError;
    break;
  default:
    type = PyExc_RuntimeError;
  }
  return type;
}


SWIGRUNTIME void
SWIG_Python_AddErrorMsg(const char* mesg)
{
  PyObject *type = 0;
  PyObject *value = 0;
  PyObject *traceback = 0;

  if (PyErr_Occurred())
    PyErr_Fetch(&type, &value, &traceback);
  if (value) {
    PyObject *old_str = PyObject_Str(value);
    const char *tmp = SWIG_Python_str_AsChar(old_str);
    PyErr_Clear();
    Py_XINCREF(type);
    if (tmp)
      PyErr_Format(type, "%s %s", tmp, mesg);
    else
      PyErr_Format(type, "%s", mesg);
    SWIG_Python_str_DelForPy3(tmp);
    Py_DECREF(old_str);
    Py_DECREF(value);
  } else {
    PyErr_SetString(PyExc_RuntimeError, mesg);
  }
}

SWIGRUNTIME int
SWIG_Python_TypeErrorOccurred(PyObject *obj)
{
  PyObject *error;
  if (obj)
    return 0;
  error = PyErr_Occurred();
  return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError);
}

SWIGRUNTIME void
SWIG_Python_RaiseOrModifyTypeError(const char *message)
{
  if (SWIG_Python_TypeErrorOccurred(NULL)) {
    /* Use existing TypeError to preserve stacktrace and enhance with given message */
    PyObject *newvalue;
    PyObject *type = NULL, *value = NULL, *traceback = NULL;
    PyErr_Fetch(&type, &value, &traceback);
#if PY_VERSION_HEX >= 0x03000000
    newvalue = PyUnicode_FromFormat("%S\nAdditional information:\n%s", value, message);
#else
    newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message);
#endif
    Py_XDECREF(value);
    PyErr_Restore(type, newvalue, traceback);
  } else {
    /* Raise TypeError using given message */
    PyErr_SetString(PyExc_TypeError, message);
  }
}

#if defined(SWIG_PYTHON_NO_THREADS)
#  if defined(SWIG_PYTHON_THREADS)
#    undef SWIG_PYTHON_THREADS
#  endif
#endif
#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
#  if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
#    define SWIG_PYTHON_USE_GIL
#  endif
#  if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
#    ifndef SWIG_PYTHON_INITIALIZE_THREADS
#     define SWIG_PYTHON_INITIALIZE_THREADS  PyEval_InitThreads() 
#    endif
#    ifdef __cplusplus /* C++ code */
       class SWIG_Python_Thread_Block {
         bool status;
         PyGILState_STATE state;
       public:
         void end() { if (status) { PyGILState_Release(state); status = false;} }
         SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
         ~SWIG_Python_Thread_Block() { end(); }
       };
       class SWIG_Python_Thread_Allow {
         bool status;
         PyThreadState *save;
       public:
         void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
         SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
         ~SWIG_Python_Thread_Allow() { end(); }
       };
#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   SWIG_Python_Thread_Block _swig_thread_block
#      define SWIG_PYTHON_THREAD_END_BLOCK     _swig_thread_block.end()
#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   SWIG_Python_Thread_Allow _swig_thread_allow
#      define SWIG_PYTHON_THREAD_END_ALLOW     _swig_thread_allow.end()
#    else /* C code */
#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
#      define SWIG_PYTHON_THREAD_END_BLOCK     PyGILState_Release(_swig_thread_block)
#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   PyThreadState *_swig_thread_allow = PyEval_SaveThread()
#      define SWIG_PYTHON_THREAD_END_ALLOW     PyEval_RestoreThread(_swig_thread_allow)
#    endif
#  else /* Old thread way, not implemented, user must provide it */
#    if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
#      define SWIG_PYTHON_INITIALIZE_THREADS
#    endif
#    if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK
#    endif
#    if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
#      define SWIG_PYTHON_THREAD_END_BLOCK
#    endif
#    if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW
#    endif
#    if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
#      define SWIG_PYTHON_THREAD_END_ALLOW
#    endif
#  endif
#else /* No thread support */
#  define SWIG_PYTHON_INITIALIZE_THREADS
#  define SWIG_PYTHON_THREAD_BEGIN_BLOCK
#  define SWIG_PYTHON_THREAD_END_BLOCK
#  define SWIG_PYTHON_THREAD_BEGIN_ALLOW
#  define SWIG_PYTHON_THREAD_END_ALLOW
#endif

/* -----------------------------------------------------------------------------
 * Python API portion that goes into the runtime
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#endif

/* -----------------------------------------------------------------------------
 * Constant declarations
 * ----------------------------------------------------------------------------- */

/* Constant Types */
#define SWIG_PY_POINTER 4
#define SWIG_PY_BINARY  5

/* Constant information structure */
typedef struct swig_const_info {
  int type;
  const char *name;
  long lvalue;
  double dvalue;
  void   *pvalue;
  swig_type_info **ptype;
} swig_const_info;

#ifdef __cplusplus
}
#endif


/* -----------------------------------------------------------------------------
 * pyrun.swg
 *
 * This file contains the runtime support for Python modules
 * and includes code for managing global variables and pointer
 * type checking.
 *
 * ----------------------------------------------------------------------------- */

#if PY_VERSION_HEX < 0x02070000 /* 2.7.0 */
# error "This version of SWIG only supports Python >= 2.7"
#endif

#if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03020000
# error "This version of SWIG only supports Python 3 >= 3.2"
#endif

/* Common SWIG API */

/* for raw pointers */
#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
#define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)

#ifdef SWIGPYTHON_BUILTIN
#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(self, ptr, type, flags)
#else
#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
#endif

#define SWIG_InternalNewPointerObj(ptr, type, flags)	SWIG_Python_NewPointerObj(NULL, ptr, type, flags)

#define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
#define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
#define swig_owntype                                    int

/* for raw packed data */
#define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
#define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)

/* for class or struct pointers */
#define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
#define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)

/* for C or C++ function pointers */
#define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(NULL, ptr, type, 0)

/* for C++ member pointers, ie, member methods */
#define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
#define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)


/* Runtime API */

#define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule(clientdata)
#define SWIG_SetModule(clientdata, pointer)             SWIG_Python_SetModule(pointer)
#define SWIG_NewClientData(obj)                         SwigPyClientData_New(obj)

#define SWIG_SetErrorObj                                SWIG_Python_SetErrorObj                            
#define SWIG_SetErrorMsg                        	SWIG_Python_SetErrorMsg				   
#define SWIG_ErrorType(code)                    	SWIG_Python_ErrorType(code)                        
#define SWIG_Error(code, msg)            		SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 
#define SWIG_fail                        		goto fail					   


/* Runtime API implementation */

/* Error manipulation */

SWIGINTERN void 
SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
  SWIG_PYTHON_THREAD_BEGIN_BLOCK; 
  PyErr_SetObject(errtype, obj);
  Py_DECREF(obj);
  SWIG_PYTHON_THREAD_END_BLOCK;
}

SWIGINTERN void 
SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  PyErr_SetString(errtype, msg);
  SWIG_PYTHON_THREAD_END_BLOCK;
}

#define SWIG_Python_Raise(obj, type, desc)  SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)

/* Set a constant value */

#if defined(SWIGPYTHON_BUILTIN)

SWIGINTERN void
SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
  PyObject *s = PyString_InternFromString(key);
  PyList_Append(seq, s);
  Py_DECREF(s);
}

SWIGINTERN void
SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {   
  PyDict_SetItemString(d, name, obj);
  Py_DECREF(obj);
  if (public_interface)
    SwigPyBuiltin_AddPublicSymbol(public_interface, name);
}

#else

SWIGINTERN void
SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
  PyDict_SetItemString(d, name, obj);
  Py_DECREF(obj);                            
}

#endif

/* Append a value to the result obj */

SWIGINTERN PyObject*
SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
  if (!result) {
    result = obj;
  } else if (result == Py_None) {
    Py_DECREF(result);
    result = obj;
  } else {
    if (!PyList_Check(result)) {
      PyObject *o2 = result;
      result = PyList_New(1);
      PyList_SetItem(result, 0, o2);
    }
    PyList_Append(result,obj);
    Py_DECREF(obj);
  }
  return result;
}

/* Unpack the argument tuple */

SWIGINTERN Py_ssize_t
SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
{
  if (!args) {
    if (!min && !max) {
      return 1;
    } else {
      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", 
		   name, (min == max ? "" : "at least "), (int)min);
      return 0;
    }
  }  
  if (!PyTuple_Check(args)) {
    if (min <= 1 && max >= 1) {
      Py_ssize_t i;
      objs[0] = args;
      for (i = 1; i < max; ++i) {
	objs[i] = 0;
      }
      return 2;
    }
    PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
    return 0;
  } else {
    Py_ssize_t l = PyTuple_GET_SIZE(args);
    if (l < min) {
      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
		   name, (min == max ? "" : "at least "), (int)min, (int)l);
      return 0;
    } else if (l > max) {
      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
		   name, (min == max ? "" : "at most "), (int)max, (int)l);
      return 0;
    } else {
      Py_ssize_t i;
      for (i = 0; i < l; ++i) {
	objs[i] = PyTuple_GET_ITEM(args, i);
      }
      for (; l < max; ++l) {
	objs[l] = 0;
      }
      return i + 1;
    }    
  }
}

SWIGINTERN int
SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name) {
  int no_kwargs = 1;
  if (kwargs) {
    assert(PyDict_Check(kwargs));
    if (PyDict_Size(kwargs) > 0) {
      PyErr_Format(PyExc_TypeError, "%s() does not take keyword arguments", name);
      no_kwargs = 0;
    }
  }
  return no_kwargs;
}

/* A functor is a function object with one single object argument */
#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunctionObjArgs(functor, obj, NULL);

/*
  Helper for static pointer initialization for both C and C++ code, for example
  static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
*/
#ifdef __cplusplus
#define SWIG_STATIC_POINTER(var)  var
#else
#define SWIG_STATIC_POINTER(var)  var = 0; if (!var) var
#endif

/* -----------------------------------------------------------------------------
 * Pointer declarations
 * ----------------------------------------------------------------------------- */

/* Flags for new pointer objects */
#define SWIG_POINTER_NOSHADOW       (SWIG_POINTER_OWN      << 1)
#define SWIG_POINTER_NEW            (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)

#define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)

#define SWIG_BUILTIN_TP_INIT	    (SWIG_POINTER_OWN << 2)
#define SWIG_BUILTIN_INIT	    (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)

#ifdef __cplusplus
extern "C" {
#endif

/* The python void return value */

SWIGRUNTIMEINLINE PyObject * 
SWIG_Py_Void(void)
{
  PyObject *none = Py_None;
  Py_INCREF(none);
  return none;
}

/* SwigPyClientData */

typedef struct {
  PyObject *klass;
  PyObject *newraw;
  PyObject *newargs;
  PyObject *destroy;
  int delargs;
  int implicitconv;
  PyTypeObject *pytype;
} SwigPyClientData;

SWIGRUNTIMEINLINE int 
SWIG_Python_CheckImplicit(swig_type_info *ty)
{
  SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
  int fail = data ? data->implicitconv : 0;
  if (fail)
    PyErr_SetString(PyExc_TypeError, "Implicit conversion is prohibited for explicit constructors.");
  return fail;
}

SWIGRUNTIMEINLINE PyObject *
SWIG_Python_ExceptionType(swig_type_info *desc) {
  SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
  PyObject *klass = data ? data->klass : 0;
  return (klass ? klass : PyExc_RuntimeError);
}


SWIGRUNTIME SwigPyClientData * 
SwigPyClientData_New(PyObject* obj)
{
  if (!obj) {
    return 0;
  } else {
    SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
    /* the klass element */
    data->klass = obj;
    Py_INCREF(data->klass);
    /* the newraw method and newargs arguments used to create a new raw instance */
    if (PyClass_Check(obj)) {
      data->newraw = 0;
      data->newargs = obj;
      Py_INCREF(obj);
    } else {
      data->newraw = PyObject_GetAttrString(data->klass, "__new__");
      if (data->newraw) {
	Py_INCREF(data->newraw);
	data->newargs = PyTuple_New(1);
	PyTuple_SetItem(data->newargs, 0, obj);
      } else {
	data->newargs = obj;
      }
      Py_INCREF(data->newargs);
    }
    /* the destroy method, aka as the C++ delete method */
    data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
    if (PyErr_Occurred()) {
      PyErr_Clear();
      data->destroy = 0;
    }
    if (data->destroy) {
      int flags;
      Py_INCREF(data->destroy);
      flags = PyCFunction_GET_FLAGS(data->destroy);
      data->delargs = !(flags & (METH_O));
    } else {
      data->delargs = 0;
    }
    data->implicitconv = 0;
    data->pytype = 0;
    return data;
  }
}

SWIGRUNTIME void 
SwigPyClientData_Del(SwigPyClientData *data) {
  Py_XDECREF(data->newraw);
  Py_XDECREF(data->newargs);
  Py_XDECREF(data->destroy);
}

/* =============== SwigPyObject =====================*/

typedef struct {
  PyObject_HEAD
  void *ptr;
  swig_type_info *ty;
  int own;
  PyObject *next;
#ifdef SWIGPYTHON_BUILTIN
  PyObject *dict;
#endif
} SwigPyObject;


#ifdef SWIGPYTHON_BUILTIN

SWIGRUNTIME PyObject *
SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
{
  SwigPyObject *sobj = (SwigPyObject *)v;

  if (!sobj->dict)
    sobj->dict = PyDict_New();

  Py_INCREF(sobj->dict);
  return sobj->dict;
}

#endif

SWIGRUNTIME PyObject *
SwigPyObject_long(SwigPyObject *v)
{
  return PyLong_FromVoidPtr(v->ptr);
}

SWIGRUNTIME PyObject *
SwigPyObject_format(const char* fmt, SwigPyObject *v)
{
  PyObject *res = NULL;
  PyObject *args = PyTuple_New(1);
  if (args) {
    if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
      PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
      if (ofmt) {
#if PY_VERSION_HEX >= 0x03000000
	res = PyUnicode_Format(ofmt,args);
#else
	res = PyString_Format(ofmt,args);
#endif
	Py_DECREF(ofmt);
      }
      Py_DECREF(args);
    }
  }
  return res;
}

SWIGRUNTIME PyObject *
SwigPyObject_oct(SwigPyObject *v)
{
  return SwigPyObject_format("%o",v);
}

SWIGRUNTIME PyObject *
SwigPyObject_hex(SwigPyObject *v)
{
  return SwigPyObject_format("%x",v);
}

SWIGRUNTIME PyObject *
SwigPyObject_repr(SwigPyObject *v)
{
  const char *name = SWIG_TypePrettyName(v->ty);
  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
  if (v->next) {
    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
# if PY_VERSION_HEX >= 0x03000000
    PyObject *joined = PyUnicode_Concat(repr, nrep);
    Py_DecRef(repr);
    Py_DecRef(nrep);
    repr = joined;
# else
    PyString_ConcatAndDel(&repr,nrep);
# endif
  }
  return repr;  
}

/* We need a version taking two PyObject* parameters so it's a valid
 * PyCFunction to use in swigobject_methods[]. */
SWIGRUNTIME PyObject *
SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
{
  return SwigPyObject_repr((SwigPyObject*)v);
}

SWIGRUNTIME int
SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
{
  void *i = v->ptr;
  void *j = w->ptr;
  return (i < j) ? -1 : ((i > j) ? 1 : 0);
}

/* Added for Python 3.x, would it also be useful for Python 2.x? */
SWIGRUNTIME PyObject*
SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
{
  PyObject* res;
  if( op != Py_EQ && op != Py_NE ) {
    Py_INCREF(Py_NotImplemented);
    return Py_NotImplemented;
  }
  res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
  return res;  
}


SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);

#ifdef SWIGPYTHON_BUILTIN
static swig_type_info *SwigPyObject_stype = 0;
SWIGRUNTIME PyTypeObject*
SwigPyObject_type(void) {
    SwigPyClientData *cd;
    assert(SwigPyObject_stype);
    cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
    assert(cd);
    assert(cd->pytype);
    return cd->pytype;
}
#else
SWIGRUNTIME PyTypeObject*
SwigPyObject_type(void) {
  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
  return type;
}
#endif

SWIGRUNTIMEINLINE int
SwigPyObject_Check(PyObject *op) {
#ifdef SWIGPYTHON_BUILTIN
  PyTypeObject *target_tp = SwigPyObject_type();
  if (PyType_IsSubtype(op->ob_type, target_tp))
    return 1;
  return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
#else
  return (Py_TYPE(op) == SwigPyObject_type())
    || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
#endif
}

SWIGRUNTIME PyObject *
SwigPyObject_New(void *ptr, swig_type_info *ty, int own);

SWIGRUNTIME void
SwigPyObject_dealloc(PyObject *v)
{
  SwigPyObject *sobj = (SwigPyObject *) v;
  PyObject *next = sobj->next;
  if (sobj->own == SWIG_POINTER_OWN) {
    swig_type_info *ty = sobj->ty;
    SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
    PyObject *destroy = data ? data->destroy : 0;
    if (destroy) {
      /* destroy is always a VARARGS method */
      PyObject *res;

      /* PyObject_CallFunction() has the potential to silently drop
         the active exception.  In cases of unnamed temporary
         variable or where we just finished iterating over a generator
         StopIteration will be active right now, and this needs to
         remain true upon return from SwigPyObject_dealloc.  So save
         and restore. */
      
      PyObject *type = NULL, *value = NULL, *traceback = NULL;
      PyErr_Fetch(&type, &value, &traceback);

      if (data->delargs) {
        /* we need to create a temporary object to carry the destroy operation */
        PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
        res = SWIG_Python_CallFunctor(destroy, tmp);
        Py_DECREF(tmp);
      } else {
        PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
        PyObject *mself = PyCFunction_GET_SELF(destroy);
        res = ((*meth)(mself, v));
      }
      if (!res)
        PyErr_WriteUnraisable(destroy);

      PyErr_Restore(type, value, traceback);

      Py_XDECREF(res);
    } 
#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
    else {
      const char *name = SWIG_TypePrettyName(ty);
      printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
    }
#endif
  } 
  Py_XDECREF(next);
  PyObject_DEL(v);
}

SWIGRUNTIME PyObject* 
SwigPyObject_append(PyObject* v, PyObject* next)
{
  SwigPyObject *sobj = (SwigPyObject *) v;
  if (!SwigPyObject_Check(next)) {
    PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
    return NULL;
  }
  sobj->next = next;
  Py_INCREF(next);
  return SWIG_Py_Void();
}

SWIGRUNTIME PyObject* 
SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
{
  SwigPyObject *sobj = (SwigPyObject *) v;
  if (sobj->next) {    
    Py_INCREF(sobj->next);
    return sobj->next;
  } else {
    return SWIG_Py_Void();
  }
}

SWIGINTERN PyObject*
SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
{
  SwigPyObject *sobj = (SwigPyObject *)v;
  sobj->own = 0;
  return SWIG_Py_Void();
}

SWIGINTERN PyObject*
SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
{
  SwigPyObject *sobj = (SwigPyObject *)v;
  sobj->own = SWIG_POINTER_OWN;
  return SWIG_Py_Void();
}

SWIGINTERN PyObject*
SwigPyObject_own(PyObject *v, PyObject *args)
{
  PyObject *val = 0;
  if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) {
    return NULL;
  } else {
    SwigPyObject *sobj = (SwigPyObject *)v;
    PyObject *obj = PyBool_FromLong(sobj->own);
    if (val) {
      if (PyObject_IsTrue(val)) {
        SwigPyObject_acquire(v,args);
      } else {
        SwigPyObject_disown(v,args);
      }
    } 
    return obj;
  }
}

static PyMethodDef
swigobject_methods[] = {
  {"disown",  SwigPyObject_disown,  METH_NOARGS,  "releases ownership of the pointer"},
  {"acquire", SwigPyObject_acquire, METH_NOARGS,  "acquires ownership of the pointer"},
  {"own",     SwigPyObject_own,     METH_VARARGS, "returns/sets ownership of the pointer"},
  {"append",  SwigPyObject_append,  METH_O,       "appends another 'this' object"},
  {"next",    SwigPyObject_next,    METH_NOARGS,  "returns the next 'this' object"},
  {"__repr__",SwigPyObject_repr2,   METH_NOARGS,  "returns object representation"},
  {0, 0, 0, 0}  
};

SWIGRUNTIME PyTypeObject*
SwigPyObject_TypeOnce(void) {
  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";

  static PyNumberMethods SwigPyObject_as_number = {
    (binaryfunc)0, /*nb_add*/
    (binaryfunc)0, /*nb_subtract*/
    (binaryfunc)0, /*nb_multiply*/
    /* nb_divide removed in Python 3 */
#if PY_VERSION_HEX < 0x03000000
    (binaryfunc)0, /*nb_divide*/
#endif
    (binaryfunc)0, /*nb_remainder*/
    (binaryfunc)0, /*nb_divmod*/
    (ternaryfunc)0,/*nb_power*/
    (unaryfunc)0,  /*nb_negative*/
    (unaryfunc)0,  /*nb_positive*/
    (unaryfunc)0,  /*nb_absolute*/
    (inquiry)0,    /*nb_nonzero*/
    0,		   /*nb_invert*/
    0,		   /*nb_lshift*/
    0,		   /*nb_rshift*/
    0,		   /*nb_and*/
    0,		   /*nb_xor*/
    0,		   /*nb_or*/
#if PY_VERSION_HEX < 0x03000000
    0,   /*nb_coerce*/
#endif
    (unaryfunc)SwigPyObject_long, /*nb_int*/
#if PY_VERSION_HEX < 0x03000000
    (unaryfunc)SwigPyObject_long, /*nb_long*/
#else
    0, /*nb_reserved*/
#endif
    (unaryfunc)0,                 /*nb_float*/
#if PY_VERSION_HEX < 0x03000000
    (unaryfunc)SwigPyObject_oct,  /*nb_oct*/
    (unaryfunc)SwigPyObject_hex,  /*nb_hex*/
#endif
#if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
#else
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
#endif
  };

  static PyTypeObject swigpyobject_type;
  static int type_init = 0;
  if (!type_init) {
    const PyTypeObject tmp = {
#if PY_VERSION_HEX >= 0x03000000
      PyVarObject_HEAD_INIT(NULL, 0)
#else
      PyObject_HEAD_INIT(NULL)
      0,                                    /* ob_size */
#endif
      "SwigPyObject",                       /* tp_name */
      sizeof(SwigPyObject),                 /* tp_basicsize */
      0,                                    /* tp_itemsize */
      (destructor)SwigPyObject_dealloc,     /* tp_dealloc */
      0,                                    /* tp_print */
      (getattrfunc)0,                       /* tp_getattr */
      (setattrfunc)0,                       /* tp_setattr */
#if PY_VERSION_HEX >= 0x03000000
      0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
#else
      (cmpfunc)SwigPyObject_compare,        /* tp_compare */
#endif
      (reprfunc)SwigPyObject_repr,          /* tp_repr */
      &SwigPyObject_as_number,              /* tp_as_number */
      0,                                    /* tp_as_sequence */
      0,                                    /* tp_as_mapping */
      (hashfunc)0,                          /* tp_hash */
      (ternaryfunc)0,                       /* tp_call */
      0,                                    /* tp_str */
      PyObject_GenericGetAttr,              /* tp_getattro */
      0,                                    /* tp_setattro */
      0,                                    /* tp_as_buffer */
      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
      swigobject_doc,                       /* tp_doc */
      0,                                    /* tp_traverse */
      0,                                    /* tp_clear */
      (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
      0,                                    /* tp_weaklistoffset */
      0,                                    /* tp_iter */
      0,                                    /* tp_iternext */
      swigobject_methods,                   /* tp_methods */
      0,                                    /* tp_members */
      0,                                    /* tp_getset */
      0,                                    /* tp_base */
      0,                                    /* tp_dict */
      0,                                    /* tp_descr_get */
      0,                                    /* tp_descr_set */
      0,                                    /* tp_dictoffset */
      0,                                    /* tp_init */
      0,                                    /* tp_alloc */
      0,                                    /* tp_new */
      0,                                    /* tp_free */
      0,                                    /* tp_is_gc */
      0,                                    /* tp_bases */
      0,                                    /* tp_mro */
      0,                                    /* tp_cache */
      0,                                    /* tp_subclasses */
      0,                                    /* tp_weaklist */
      0,                                    /* tp_del */
      0,                                    /* tp_version_tag */
#if PY_VERSION_HEX >= 0x03040000
      0,                                    /* tp_finalize */
#endif
#if PY_VERSION_HEX >= 0x03080000
      0,                                    /* tp_vectorcall */
#endif
#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
      0,                                    /* tp_print */
#endif
#ifdef COUNT_ALLOCS
      0,                                    /* tp_allocs */
      0,                                    /* tp_frees */
      0,                                    /* tp_maxalloc */
      0,                                    /* tp_prev */
      0                                     /* tp_next */
#endif
    };
    swigpyobject_type = tmp;
    type_init = 1;
    if (PyType_Ready(&swigpyobject_type) < 0)
      return NULL;
  }
  return &swigpyobject_type;
}

SWIGRUNTIME PyObject *
SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
{
  SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
  if (sobj) {
    sobj->ptr  = ptr;
    sobj->ty   = ty;
    sobj->own  = own;
    sobj->next = 0;
  }
  return (PyObject *)sobj;
}

/* -----------------------------------------------------------------------------
 * Implements a simple Swig Packed type, and use it instead of string
 * ----------------------------------------------------------------------------- */

typedef struct {
  PyObject_HEAD
  void *pack;
  swig_type_info *ty;
  size_t size;
} SwigPyPacked;

SWIGRUNTIME PyObject *
SwigPyPacked_repr(SwigPyPacked *v)
{
  char result[SWIG_BUFFER_SIZE];
  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
    return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
  } else {
    return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
  }  
}

SWIGRUNTIME PyObject *
SwigPyPacked_str(SwigPyPacked *v)
{
  char result[SWIG_BUFFER_SIZE];
  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
    return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
  } else {
    return SWIG_Python_str_FromChar(v->ty->name);
  }  
}

SWIGRUNTIME int
SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
{
  size_t i = v->size;
  size_t j = w->size;
  int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
  return s ? s : strncmp((const char *)v->pack, (const char *)w->pack, 2*v->size);
}

SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);

SWIGRUNTIME PyTypeObject*
SwigPyPacked_type(void) {
  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
  return type;
}

SWIGRUNTIMEINLINE int
SwigPyPacked_Check(PyObject *op) {
  return ((op)->ob_type == SwigPyPacked_TypeOnce()) 
    || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
}

SWIGRUNTIME void
SwigPyPacked_dealloc(PyObject *v)
{
  if (SwigPyPacked_Check(v)) {
    SwigPyPacked *sobj = (SwigPyPacked *) v;
    free(sobj->pack);
  }
  PyObject_DEL(v);
}

SWIGRUNTIME PyTypeObject*
SwigPyPacked_TypeOnce(void) {
  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
  static PyTypeObject swigpypacked_type;
  static int type_init = 0;
  if (!type_init) {
    const PyTypeObject tmp = {
#if PY_VERSION_HEX>=0x03000000
      PyVarObject_HEAD_INIT(NULL, 0)
#else
      PyObject_HEAD_INIT(NULL)
      0,                                    /* ob_size */
#endif
      "SwigPyPacked",                       /* tp_name */
      sizeof(SwigPyPacked),                 /* tp_basicsize */
      0,                                    /* tp_itemsize */
      (destructor)SwigPyPacked_dealloc,     /* tp_dealloc */
      0,                                    /* tp_print */
      (getattrfunc)0,                       /* tp_getattr */
      (setattrfunc)0,                       /* tp_setattr */
#if PY_VERSION_HEX>=0x03000000
      0, /* tp_reserved in 3.0.1 */
#else
      (cmpfunc)SwigPyPacked_compare,        /* tp_compare */
#endif
      (reprfunc)SwigPyPacked_repr,          /* tp_repr */
      0,                                    /* tp_as_number */
      0,                                    /* tp_as_sequence */
      0,                                    /* tp_as_mapping */
      (hashfunc)0,                          /* tp_hash */
      (ternaryfunc)0,                       /* tp_call */
      (reprfunc)SwigPyPacked_str,           /* tp_str */
      PyObject_GenericGetAttr,              /* tp_getattro */
      0,                                    /* tp_setattro */
      0,                                    /* tp_as_buffer */
      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
      swigpacked_doc,                       /* tp_doc */
      0,                                    /* tp_traverse */
      0,                                    /* tp_clear */
      0,                                    /* tp_richcompare */
      0,                                    /* tp_weaklistoffset */
      0,                                    /* tp_iter */
      0,                                    /* tp_iternext */
      0,                                    /* tp_methods */
      0,                                    /* tp_members */
      0,                                    /* tp_getset */
      0,                                    /* tp_base */
      0,                                    /* tp_dict */
      0,                                    /* tp_descr_get */
      0,                                    /* tp_descr_set */
      0,                                    /* tp_dictoffset */
      0,                                    /* tp_init */
      0,                                    /* tp_alloc */
      0,                                    /* tp_new */
      0,                                    /* tp_free */
      0,                                    /* tp_is_gc */
      0,                                    /* tp_bases */
      0,                                    /* tp_mro */
      0,                                    /* tp_cache */
      0,                                    /* tp_subclasses */
      0,                                    /* tp_weaklist */
      0,                                    /* tp_del */
      0,                                    /* tp_version_tag */
#if PY_VERSION_HEX >= 0x03040000
      0,                                    /* tp_finalize */
#endif
#if PY_VERSION_HEX >= 0x03080000
      0,                                    /* tp_vectorcall */
#endif
#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
      0,                                    /* tp_print */
#endif
#ifdef COUNT_ALLOCS
      0,                                    /* tp_allocs */
      0,                                    /* tp_frees */
      0,                                    /* tp_maxalloc */
      0,                                    /* tp_prev */
      0                                     /* tp_next */
#endif
    };
    swigpypacked_type = tmp;
    type_init = 1;
    if (PyType_Ready(&swigpypacked_type) < 0)
      return NULL;
  }
  return &swigpypacked_type;
}

SWIGRUNTIME PyObject *
SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
{
  SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
  if (sobj) {
    void *pack = malloc(size);
    if (pack) {
      memcpy(pack, ptr, size);
      sobj->pack = pack;
      sobj->ty   = ty;
      sobj->size = size;
    } else {
      PyObject_DEL((PyObject *) sobj);
      sobj = 0;
    }
  }
  return (PyObject *) sobj;
}

SWIGRUNTIME swig_type_info *
SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
{
  if (SwigPyPacked_Check(obj)) {
    SwigPyPacked *sobj = (SwigPyPacked *)obj;
    if (sobj->size != size) return 0;
    memcpy(ptr, sobj->pack, size);
    return sobj->ty;
  } else {
    return 0;
  }
}

/* -----------------------------------------------------------------------------
 * pointers/data manipulation
 * ----------------------------------------------------------------------------- */

static PyObject *Swig_This_global = NULL;

SWIGRUNTIME PyObject *
SWIG_This(void)
{
  if (Swig_This_global == NULL)
    Swig_This_global = SWIG_Python_str_FromChar("this");
  return Swig_This_global;
}

/* #define SWIG_PYTHON_SLOW_GETSET_THIS */

/* TODO: I don't know how to implement the fast getset in Python 3 right now */
#if PY_VERSION_HEX>=0x03000000
#define SWIG_PYTHON_SLOW_GETSET_THIS 
#endif

SWIGRUNTIME SwigPyObject *
SWIG_Python_GetSwigThis(PyObject *pyobj) 
{
  PyObject *obj;

  if (SwigPyObject_Check(pyobj))
    return (SwigPyObject *) pyobj;

#ifdef SWIGPYTHON_BUILTIN
  (void)obj;
# ifdef PyWeakref_CheckProxy
  if (PyWeakref_CheckProxy(pyobj)) {
    pyobj = PyWeakref_GET_OBJECT(pyobj);
    if (pyobj && SwigPyObject_Check(pyobj))
      return (SwigPyObject*) pyobj;
  }
# endif
  return NULL;
#else

  obj = 0;

#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
  if (PyInstance_Check(pyobj)) {
    obj = _PyInstance_Lookup(pyobj, SWIG_This());      
  } else {
    PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
    if (dictptr != NULL) {
      PyObject *dict = *dictptr;
      obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
    } else {
#ifdef PyWeakref_CheckProxy
      if (PyWeakref_CheckProxy(pyobj)) {
	PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
	return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
      }
#endif
      obj = PyObject_GetAttr(pyobj,SWIG_This());
      if (obj) {
	Py_DECREF(obj);
      } else {
	if (PyErr_Occurred()) PyErr_Clear();
	return 0;
      }
    }
  }
#else
  obj = PyObject_GetAttr(pyobj,SWIG_This());
  if (obj) {
    Py_DECREF(obj);
  } else {
    if (PyErr_Occurred()) PyErr_Clear();
    return 0;
  }
#endif
  if (obj && !SwigPyObject_Check(obj)) {
    /* a PyObject is called 'this', try to get the 'real this'
       SwigPyObject from it */ 
    return SWIG_Python_GetSwigThis(obj);
  }
  return (SwigPyObject *)obj;
#endif
}

/* Acquire a pointer value */

SWIGRUNTIME int
SWIG_Python_AcquirePtr(PyObject *obj, int own) {
  if (own == SWIG_POINTER_OWN) {
    SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
    if (sobj) {
      int oldown = sobj->own;
      sobj->own = own;
      return oldown;
    }
  }
  return 0;
}

/* Convert a pointer value */

SWIGRUNTIME int
SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
  int res;
  SwigPyObject *sobj;
  int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;

  if (!obj)
    return SWIG_ERROR;
  if (obj == Py_None && !implicit_conv) {
    if (ptr)
      *ptr = 0;
    return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
  }

  res = SWIG_ERROR;

  sobj = SWIG_Python_GetSwigThis(obj);
  if (own)
    *own = 0;
  while (sobj) {
    void *vptr = sobj->ptr;
    if (ty) {
      swig_type_info *to = sobj->ty;
      if (to == ty) {
        /* no type cast needed */
        if (ptr) *ptr = vptr;
        break;
      } else {
        swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
        if (!tc) {
          sobj = (SwigPyObject *)sobj->next;
        } else {
          if (ptr) {
            int newmemory = 0;
            *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
            if (newmemory == SWIG_CAST_NEW_MEMORY) {
              assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
              if (own)
                *own = *own | SWIG_CAST_NEW_MEMORY;
            }
          }
          break;
        }
      }
    } else {
      if (ptr) *ptr = vptr;
      break;
    }
  }
  if (sobj) {
    if (own)
      *own = *own | sobj->own;
    if (flags & SWIG_POINTER_DISOWN) {
      sobj->own = 0;
    }
    res = SWIG_OK;
  } else {
    if (implicit_conv) {
      SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
      if (data && !data->implicitconv) {
        PyObject *klass = data->klass;
        if (klass) {
          PyObject *impconv;
          data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
          impconv = SWIG_Python_CallFunctor(klass, obj);
          data->implicitconv = 0;
          if (PyErr_Occurred()) {
            PyErr_Clear();
            impconv = 0;
          }
          if (impconv) {
            SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
            if (iobj) {
              void *vptr;
              res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
              if (SWIG_IsOK(res)) {
                if (ptr) {
                  *ptr = vptr;
                  /* transfer the ownership to 'ptr' */
                  iobj->own = 0;
                  res = SWIG_AddCast(res);
                  res = SWIG_AddNewMask(res);
                } else {
                  res = SWIG_AddCast(res);		    
                }
              }
            }
            Py_DECREF(impconv);
          }
        }
      }
      if (!SWIG_IsOK(res) && obj == Py_None) {
        if (ptr)
          *ptr = 0;
        if (PyErr_Occurred())
          PyErr_Clear();
        res = SWIG_OK;
      }
    }
  }
  return res;
}

/* Convert a function ptr value */

SWIGRUNTIME int
SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
  if (!PyCFunction_Check(obj)) {
    return SWIG_ConvertPtr(obj, ptr, ty, 0);
  } else {
    void *vptr = 0;
    swig_cast_info *tc;

    /* here we get the method pointer for callbacks */
    const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
    const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
    if (desc)
      desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
    if (!desc)
      return SWIG_ERROR;
    tc = SWIG_TypeCheck(desc,ty);
    if (tc) {
      int newmemory = 0;
      *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
      assert(!newmemory); /* newmemory handling not yet implemented */
    } else {
      return SWIG_ERROR;
    }
    return SWIG_OK;
  }
}

/* Convert a packed pointer value */

SWIGRUNTIME int
SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
  swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
  if (!to) return SWIG_ERROR;
  if (ty) {
    if (to != ty) {
      /* check type cast? */
      swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
      if (!tc) return SWIG_ERROR;
    }
  }
  return SWIG_OK;
}  

/* -----------------------------------------------------------------------------
 * Create a new pointer object
 * ----------------------------------------------------------------------------- */

/*
  Create a new instance object, without calling __init__, and set the
  'this' attribute.
*/

SWIGRUNTIME PyObject* 
SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
{
  PyObject *inst = 0;
  PyObject *newraw = data->newraw;
  if (newraw) {
    inst = PyObject_Call(newraw, data->newargs, NULL);
    if (inst) {
#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
      PyObject **dictptr = _PyObject_GetDictPtr(inst);
      if (dictptr != NULL) {
	PyObject *dict = *dictptr;
	if (dict == NULL) {
	  dict = PyDict_New();
	  *dictptr = dict;
	  PyDict_SetItem(dict, SWIG_This(), swig_this);
	}
      }
#else
      if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
        Py_DECREF(inst);
        inst = 0;
      }
#endif
    }
  } else {
#if PY_VERSION_HEX >= 0x03000000
    PyObject *empty_args = PyTuple_New(0);
    if (empty_args) {
      PyObject *empty_kwargs = PyDict_New();
      if (empty_kwargs) {
        inst = ((PyTypeObject *)data->newargs)->tp_new((PyTypeObject *)data->newargs, empty_args, empty_kwargs);
        Py_DECREF(empty_kwargs);
        if (inst) {
          if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
            Py_DECREF(inst);
            inst = 0;
          } else {
            Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
          }
        }
      }
      Py_DECREF(empty_args);
    }
#else
    PyObject *dict = PyDict_New();
    if (dict) {
      PyDict_SetItem(dict, SWIG_This(), swig_this);
      inst = PyInstance_NewRaw(data->newargs, dict);
      Py_DECREF(dict);
    }
#endif
  }
  return inst;
}

SWIGRUNTIME int
SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
{
#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
  PyObject **dictptr = _PyObject_GetDictPtr(inst);
  if (dictptr != NULL) {
    PyObject *dict = *dictptr;
    if (dict == NULL) {
      dict = PyDict_New();
      *dictptr = dict;
    }
    return PyDict_SetItem(dict, SWIG_This(), swig_this);
  }
#endif
  return PyObject_SetAttr(inst, SWIG_This(), swig_this);
} 


SWIGINTERN PyObject *
SWIG_Python_InitShadowInstance(PyObject *args) {
  PyObject *obj[2];
  if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
    return NULL;
  } else {
    SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
    if (sthis) {
      SwigPyObject_append((PyObject*) sthis, obj[1]);
    } else {
      if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0)
        return NULL;
    }
    return SWIG_Py_Void();
  }
}

/* Create a new pointer object */

SWIGRUNTIME PyObject *
SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
  SwigPyClientData *clientdata;
  PyObject * robj;
  int own;

  if (!ptr)
    return SWIG_Py_Void();

  clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
  own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
  if (clientdata && clientdata->pytype) {
    SwigPyObject *newobj;
    if (flags & SWIG_BUILTIN_TP_INIT) {
      newobj = (SwigPyObject*) self;
      if (newobj->ptr) {
        PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
        while (newobj->next)
	  newobj = (SwigPyObject *) newobj->next;
        newobj->next = next_self;
        newobj = (SwigPyObject *)next_self;
#ifdef SWIGPYTHON_BUILTIN
        newobj->dict = 0;
#endif
      }
    } else {
      newobj = PyObject_New(SwigPyObject, clientdata->pytype);
#ifdef SWIGPYTHON_BUILTIN
      newobj->dict = 0;
#endif
    }
    if (newobj) {
      newobj->ptr = ptr;
      newobj->ty = type;
      newobj->own = own;
      newobj->next = 0;
      return (PyObject*) newobj;
    }
    return SWIG_Py_Void();
  }

  assert(!(flags & SWIG_BUILTIN_TP_INIT));

  robj = SwigPyObject_New(ptr, type, own);
  if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
    PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
    Py_DECREF(robj);
    robj = inst;
  }
  return robj;
}

/* Create a new packed object */

SWIGRUNTIMEINLINE PyObject *
SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
  return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
}

/* -----------------------------------------------------------------------------*
 *  Get type list 
 * -----------------------------------------------------------------------------*/

#ifdef SWIG_LINK_RUNTIME
void *SWIG_ReturnGlobalTypeList(void *);
#endif

SWIGRUNTIME swig_module_info *
SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
  static void *type_pointer = (void *)0;
  /* first check if module already created */
  if (!type_pointer) {
#ifdef SWIG_LINK_RUNTIME
    type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
#else
    type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
    if (PyErr_Occurred()) {
      PyErr_Clear();
      type_pointer = (void *)0;
    }
#endif
  }
  return (swig_module_info *) type_pointer;
}

SWIGRUNTIME void
SWIG_Python_DestroyModule(PyObject *obj)
{
  swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
  swig_type_info **types = swig_module->types;
  size_t i;
  for (i =0; i < swig_module->size; ++i) {
    swig_type_info *ty = types[i];
    if (ty->owndata) {
      SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
      if (data) SwigPyClientData_Del(data);
    }
  }
  Py_DECREF(SWIG_This());
  Swig_This_global = NULL;
}

SWIGRUNTIME void
SWIG_Python_SetModule(swig_module_info *swig_module) {
#if PY_VERSION_HEX >= 0x03000000
 /* Add a dummy module object into sys.modules */
  PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION);
#else
  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
  PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
#endif
  PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
  if (pointer && module) {
    PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
  } else {
    Py_XDECREF(pointer);
  }
}

/* The python cached type query */
SWIGRUNTIME PyObject *
SWIG_Python_TypeCache(void) {
  static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
  return cache;
}

SWIGRUNTIME swig_type_info *
SWIG_Python_TypeQuery(const char *type)
{
  PyObject *cache = SWIG_Python_TypeCache();
  PyObject *key = SWIG_Python_str_FromChar(type); 
  PyObject *obj = PyDict_GetItem(cache, key);
  swig_type_info *descriptor;
  if (obj) {
    descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
  } else {
    swig_module_info *swig_module = SWIG_GetModule(0);
    descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
    if (descriptor) {
      obj = PyCapsule_New((void*) descriptor, NULL, NULL);
      PyDict_SetItem(cache, key, obj);
      Py_DECREF(obj);
    }
  }
  Py_DECREF(key);
  return descriptor;
}

/* 
   For backward compatibility only
*/
#define SWIG_POINTER_EXCEPTION  0
#define SWIG_arg_fail(arg)      SWIG_Python_ArgFail(arg)
#define SWIG_MustGetPtr(p, type, argnum, flags)  SWIG_Python_MustGetPtr(p, type, argnum, flags)

SWIGRUNTIME int
SWIG_Python_AddErrMesg(const char* mesg, int infront)
{  
  if (PyErr_Occurred()) {
    PyObject *type = 0;
    PyObject *value = 0;
    PyObject *traceback = 0;
    PyErr_Fetch(&type, &value, &traceback);
    if (value) {
      PyObject *old_str = PyObject_Str(value);
      const char *tmp = SWIG_Python_str_AsChar(old_str);
      const char *errmesg = tmp ? tmp : "Invalid error message";
      Py_XINCREF(type);
      PyErr_Clear();
      if (infront) {
	PyErr_Format(type, "%s %s", mesg, errmesg);
      } else {
	PyErr_Format(type, "%s %s", errmesg, mesg);
      }
      SWIG_Python_str_DelForPy3(tmp);
      Py_DECREF(old_str);
    }
    return 1;
  } else {
    return 0;
  }
}
  
SWIGRUNTIME int
SWIG_Python_ArgFail(int argnum)
{
  if (PyErr_Occurred()) {
    /* add information about failing argument */
    char mesg[256];
    PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
    return SWIG_Python_AddErrMesg(mesg, 1);
  } else {
    return 0;
  }
}

SWIGRUNTIMEINLINE const char *
SwigPyObject_GetDesc(PyObject *self)
{
  SwigPyObject *v = (SwigPyObject *)self;
  swig_type_info *ty = v ? v->ty : 0;
  return ty ? ty->str : "";
}

SWIGRUNTIME void
SWIG_Python_TypeError(const char *type, PyObject *obj)
{
  if (type) {
#if defined(SWIG_COBJECT_TYPES)
    if (obj && SwigPyObject_Check(obj)) {
      const char *otype = (const char *) SwigPyObject_GetDesc(obj);
      if (otype) {
	PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
		     type, otype);
	return;
      }
    } else 
#endif      
    {
      const char *otype = (obj ? obj->ob_type->tp_name : 0); 
      if (otype) {
	PyObject *str = PyObject_Str(obj);
	const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
	if (cstr) {
	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
		       type, otype, cstr);
          SWIG_Python_str_DelForPy3(cstr);
	} else {
	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
		       type, otype);
	}
	Py_XDECREF(str);
	return;
      }
    }   
    PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
  } else {
    PyErr_Format(PyExc_TypeError, "unexpected type is received");
  }
}


/* Convert a pointer value, signal an exception on a type mismatch */
SWIGRUNTIME void *
SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
  void *result;
  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
    PyErr_Clear();
#if SWIG_POINTER_EXCEPTION
    if (flags) {
      SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
      SWIG_Python_ArgFail(argnum);
    }
#endif
  }
  return result;
}

#ifdef SWIGPYTHON_BUILTIN
SWIGRUNTIME int
SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
  PyTypeObject *tp = obj->ob_type;
  PyObject *descr;
  PyObject *encoded_name;
  descrsetfunc f;
  int res = -1;

# ifdef Py_USING_UNICODE
  if (PyString_Check(name)) {
    name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
    if (!name)
      return -1;
  } else if (!PyUnicode_Check(name))
# else
  if (!PyString_Check(name))
# endif
  {
    PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
    return -1;
  } else {
    Py_INCREF(name);
  }

  if (!tp->tp_dict) {
    if (PyType_Ready(tp) < 0)
      goto done;
  }

  descr = _PyType_Lookup(tp, name);
  f = NULL;
  if (descr != NULL)
    f = descr->ob_type->tp_descr_set;
  if (!f) {
    if (PyString_Check(name)) {
      encoded_name = name;
      Py_INCREF(name);
    } else {
      encoded_name = PyUnicode_AsUTF8String(name);
      if (!encoded_name)
        return -1;
    }
    PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
    Py_DECREF(encoded_name);
  } else {
    res = f(descr, obj, value);
  }
  
  done:
  Py_DECREF(name);
  return res;
}
#endif


#ifdef __cplusplus
}
#endif



#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 

#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 



#ifdef __cplusplus
extern "C" {
#endif

/* Method creation and docstring support functions */

SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name);
SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);

#ifdef __cplusplus
}
#endif


  #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) 


/* -------- TYPES TABLE (BEGIN) -------- */

#define SWIGTYPE_p_FILE swig_types[0]
#define SWIGTYPE_p_GEOMETRIC_OBJECT swig_types[1]
#define SWIGTYPE_p_a_2__meep_geom__cond_profile swig_types[2]
#define SWIGTYPE_p_a_2__p_double swig_types[3]
#define SWIGTYPE_p_a_5__bool swig_types[4]
#define SWIGTYPE_p_a_5__meep__boundary_condition swig_types[5]
#define SWIGTYPE_p_a_5__p_double swig_types[6]
#define SWIGTYPE_p_a_9__std__complexT_double_t swig_types[7]
#define SWIGTYPE_p_access_mode swig_types[8]
#define SWIGTYPE_p_allocator_type swig_types[9]
#define SWIGTYPE_p_amplitude_function swig_types[10]
#define SWIGTYPE_p_bool swig_types[11]
#define SWIGTYPE_p_boundary_region_kind swig_types[12]
#define SWIGTYPE_p_char swig_types[13]
#define SWIGTYPE_p_difference_type swig_types[14]
#define SWIGTYPE_p_double swig_types[15]
#define SWIGTYPE_p_evectmatrix swig_types[16]
#define SWIGTYPE_p_f_double_int_p_void__meep__vec swig_types[17]
#define SWIGTYPE_p_f_double_p_void__double swig_types[18]
#define SWIGTYPE_p_f_double_p_void__std__complexT_double_t swig_types[19]
#define SWIGTYPE_p_f_int_p_double_p_void__double swig_types[20]
#define SWIGTYPE_p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void swig_types[21]
#define SWIGTYPE_p_f_p_q_const__char__void swig_types[22]
#define SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double swig_types[23]
#define SWIGTYPE_p_f_p_q_const__std__complex__meep__realnum___r_q_const__meep__vec_p_void__std__complexT_double_t swig_types[24]
#define SWIGTYPE_p_f_std__complex__double____std__complexT_double_t swig_types[25]
#define SWIGTYPE_p_float swig_types[26]
#define SWIGTYPE_p_geom_box swig_types[27]
#define SWIGTYPE_p_geom_box_tree swig_types[28]
#define SWIGTYPE_p_geometric_object swig_types[29]
#define SWIGTYPE_p_geometric_object_list swig_types[30]
#define SWIGTYPE_p_int swig_types[31]
#define SWIGTYPE_p_long_double swig_types[32]
#define SWIGTYPE_p_material_data swig_types[33]
#define SWIGTYPE_p_material_type swig_types[34]
#define SWIGTYPE_p_material_type_list swig_types[35]
#define SWIGTYPE_p_maxwell_data swig_types[36]
#define SWIGTYPE_p_meep__binary_partition swig_types[37]
#define SWIGTYPE_p_meep__boundary_region swig_types[38]
#define SWIGTYPE_p_meep__chunkloop_field_components swig_types[39]
#define SWIGTYPE_p_meep__comms_key swig_types[40]
#define SWIGTYPE_p_meep__component swig_types[41]
#define SWIGTYPE_p_meep__continuous_src_time swig_types[42]
#define SWIGTYPE_p_meep__custom_py_src_time swig_types[43]
#define SWIGTYPE_p_meep__custom_src_time swig_types[44]
#define SWIGTYPE_p_meep__dft_chunk swig_types[45]
#define SWIGTYPE_p_meep__dft_energy swig_types[46]
#define SWIGTYPE_p_meep__dft_fields swig_types[47]
#define SWIGTYPE_p_meep__dft_flux swig_types[48]
#define SWIGTYPE_p_meep__dft_force swig_types[49]
#define SWIGTYPE_p_meep__dft_ldos swig_types[50]
#define SWIGTYPE_p_meep__dft_near2far swig_types[51]
#define SWIGTYPE_p_meep__diffractedplanewave swig_types[52]
#define SWIGTYPE_p_meep__direction swig_types[53]
#define SWIGTYPE_p_meep__eigenmode_data swig_types[54]
#define SWIGTYPE_p_meep__fields swig_types[55]
#define SWIGTYPE_p_meep__fields_chunk swig_types[56]
#define SWIGTYPE_p_meep__flux_vol swig_types[57]
#define SWIGTYPE_p_meep__gaussian_src_time swig_types[58]
#define SWIGTYPE_p_meep__gaussianbeam swig_types[59]
#define SWIGTYPE_p_meep__grid_volume swig_types[60]
#define SWIGTYPE_p_meep__gyrotropic_susceptibility swig_types[61]
#define SWIGTYPE_p_meep__gyrotropy_model swig_types[62]
#define SWIGTYPE_p_meep__h5file swig_types[63]
#define SWIGTYPE_p_meep__h5file__extending_s swig_types[64]
#define SWIGTYPE_p_meep__initialize swig_types[65]
#define SWIGTYPE_p_meep__ivec swig_types[66]
#define SWIGTYPE_p_meep__lorentzian_susceptibility swig_types[67]
#define SWIGTYPE_p_meep__material_function swig_types[68]
#define SWIGTYPE_p_meep__monitor_point swig_types[69]
#define SWIGTYPE_p_meep__multilevel_susceptibility swig_types[70]
#define SWIGTYPE_p_meep__noisy_lorentzian_susceptibility swig_types[71]
#define SWIGTYPE_p_meep__polarization_state_s swig_types[72]
#define SWIGTYPE_p_meep__signed_direction swig_types[73]
#define SWIGTYPE_p_meep__simple_material_function swig_types[74]
#define SWIGTYPE_p_meep__sourcedata swig_types[75]
#define SWIGTYPE_p_meep__split_plane swig_types[76]
#define SWIGTYPE_p_meep__src_time swig_types[77]
#define SWIGTYPE_p_meep__structure swig_types[78]
#define SWIGTYPE_p_meep__structure_chunk swig_types[79]
#define SWIGTYPE_p_meep__susceptibility swig_types[80]
#define SWIGTYPE_p_meep__symmetry swig_types[81]
#define SWIGTYPE_p_meep__vec swig_types[82]
#define SWIGTYPE_p_meep__volume swig_types[83]
#define SWIGTYPE_p_meep__volume_list swig_types[84]
#define SWIGTYPE_p_meep_geom__absorber swig_types[85]
#define SWIGTYPE_p_meep_geom__cond_profile swig_types[86]
#define SWIGTYPE_p_meep_geom__dft_data swig_types[87]
#define SWIGTYPE_p_meep_geom__fragment_stats swig_types[88]
#define SWIGTYPE_p_meep_geom__geom_epsilon swig_types[89]
#define SWIGTYPE_p_meep_geom__pol swig_types[90]
#define SWIGTYPE_p_meep_geom__susceptibility swig_types[91]
#define SWIGTYPE_p_meep_geom__symm_matrix swig_types[92]
#define SWIGTYPE_p_p_PyObject swig_types[93]
#define SWIGTYPE_p_p_double swig_types[94]
#define SWIGTYPE_p_p_meep__continuous_src_time swig_types[95]
#define SWIGTYPE_p_p_meep__custom_py_src_time swig_types[96]
#define SWIGTYPE_p_p_meep__custom_src_time swig_types[97]
#define SWIGTYPE_p_p_meep__dft_chunk swig_types[98]
#define SWIGTYPE_p_p_meep__fields_chunk swig_types[99]
#define SWIGTYPE_p_p_meep__gaussian_src_time swig_types[100]
#define SWIGTYPE_p_p_meep__gyrotropic_susceptibility swig_types[101]
#define SWIGTYPE_p_p_meep__lorentzian_susceptibility swig_types[102]
#define SWIGTYPE_p_p_meep__multilevel_susceptibility swig_types[103]
#define SWIGTYPE_p_p_meep__noisy_lorentzian_susceptibility swig_types[104]
#define SWIGTYPE_p_p_meep__src_time swig_types[105]
#define SWIGTYPE_p_p_meep__structure_chunk swig_types[106]
#define SWIGTYPE_p_p_meep__susceptibility swig_types[107]
#define SWIGTYPE_p_p_p_char swig_types[108]
#define SWIGTYPE_p_p_std__complexT_double_t swig_types[109]
#define SWIGTYPE_p_p_void swig_types[110]
#define SWIGTYPE_p_ptrdiff_t swig_types[111]
#define SWIGTYPE_p_scalar_complex swig_types[112]
#define SWIGTYPE_p_size_t swig_types[113]
#define SWIGTYPE_p_size_type swig_types[114]
#define SWIGTYPE_p_std__allocatorT_double_t swig_types[115]
#define SWIGTYPE_p_std__allocatorT_int_t swig_types[116]
#define SWIGTYPE_p_std__allocatorT_meep__grid_volume_t swig_types[117]
#define SWIGTYPE_p_std__allocatorT_meep__sourcedata_t swig_types[118]
#define SWIGTYPE_p_std__allocatorT_meep__volume_t swig_types[119]
#define SWIGTYPE_p_std__allocatorT_meep_geom__dft_data_t swig_types[120]
#define SWIGTYPE_p_std__allocatorT_meep_geom__fragment_stats_t swig_types[121]
#define SWIGTYPE_p_std__allocatorT_size_t_t swig_types[122]
#define SWIGTYPE_p_std__allocatorT_std__complexT_double_t_t swig_types[123]
#define SWIGTYPE_p_std__complexT_double_t swig_types[124]
#define SWIGTYPE_p_std__complexT_float_t swig_types[125]
#define SWIGTYPE_p_std__complexT_long_double_t swig_types[126]
#define SWIGTYPE_p_std__invalid_argument swig_types[127]
#define SWIGTYPE_p_std__pairT_int_int_t swig_types[128]
#define SWIGTYPE_p_std__unique_ptrT_meep__binary_partition_t swig_types[129]
#define SWIGTYPE_p_std__unordered_mapT_meep__time_sink_double_std__hashT_int_t_t swig_types[130]
#define SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t swig_types[131]
#define SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t swig_types[132]
#define SWIGTYPE_p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t swig_types[133]
#define SWIGTYPE_p_std__vectorT_meep__dft_fields_p_std__allocatorT_meep__dft_fields_p_t_t swig_types[134]
#define SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t swig_types[135]
#define SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t swig_types[136]
#define SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t swig_types[137]
#define SWIGTYPE_p_std__vectorT_meep_geom__absorber_std__allocatorT_meep_geom__absorber_t_t swig_types[138]
#define SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t swig_types[139]
#define SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t swig_types[140]
#define SWIGTYPE_p_std__vectorT_ptrdiff_t_std__allocatorT_ptrdiff_t_t_t swig_types[141]
#define SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t swig_types[142]
#define SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t swig_types[143]
#define SWIGTYPE_p_swig__SwigPyIterator swig_types[144]
#define SWIGTYPE_p_user_material_func swig_types[145]
#define SWIGTYPE_p_value_type swig_types[146]
#define SWIGTYPE_p_vector3 swig_types[147]
#define SWIGTYPE_p_void swig_types[148]
static swig_type_info *swig_types[150];
static swig_module_info swig_module = {swig_types, 149, 0, 0, 0, 0};
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)

/* -------- TYPES TABLE (END) -------- */

#ifdef SWIG_TypeQuery
# undef SWIG_TypeQuery
#endif
#define SWIG_TypeQuery SWIG_Python_TypeQuery

/*-----------------------------------------------
              @(target):= _meep.so
  ------------------------------------------------*/
#if PY_VERSION_HEX >= 0x03000000
#  define SWIG_init    PyInit__meep

#else
#  define SWIG_init    init_meep

#endif
#define SWIG_name    "_meep"

#define SWIGVERSION 0x040002 
#define SWIG_VERSION SWIGVERSION


#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) 
#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) 


#include <stdexcept>


namespace swig {
  class SwigPtr_PyObject {
  protected:
    PyObject *_obj;

  public:
    SwigPtr_PyObject() :_obj(0)
    {
    }

    SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
    {
      SWIG_PYTHON_THREAD_BEGIN_BLOCK;
      Py_XINCREF(_obj);      
      SWIG_PYTHON_THREAD_END_BLOCK;
    }
    
    SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
    {
      if (initial_ref) {
        SWIG_PYTHON_THREAD_BEGIN_BLOCK;
        Py_XINCREF(_obj);
        SWIG_PYTHON_THREAD_END_BLOCK;
      }
    }
    
    SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) 
    {
      SWIG_PYTHON_THREAD_BEGIN_BLOCK;
      Py_XINCREF(item._obj);
      Py_XDECREF(_obj);
      _obj = item._obj;
      SWIG_PYTHON_THREAD_END_BLOCK;
      return *this;      
    }
    
    ~SwigPtr_PyObject() 
    {
      SWIG_PYTHON_THREAD_BEGIN_BLOCK;
      Py_XDECREF(_obj);
      SWIG_PYTHON_THREAD_END_BLOCK;
    }
    
    operator PyObject *() const
    {
      return _obj;
    }

    PyObject *operator->() const
    {
      return _obj;
    }
  };
}


namespace swig {
  struct SwigVar_PyObject : SwigPtr_PyObject {
    SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
    
    SwigVar_PyObject & operator = (PyObject* obj)
    {
      Py_XDECREF(_obj);
      _obj = obj;
      return *this;      
    }
  };
}


#define SWIG_FILE_WITH_INIT
#define SWIG_PYTHON_2_UNICODE

/*
 * In C++ we can use a scoped variable to acquire the GIL and then auto release
 * on leaving scope, making our code a bit cleaner.
 *
 * SWIG_PYTHON_THREAD_SCOPED_BLOCK is a macro that SWIG automatically generates
 * wrapping a class using an RAII pattern to automatically acquire/release
 * the GIL. See the generated meep-python.cxx for details.
 *
 * We could instead just explicitly call SWIG_PYTHON_THREAD_BEGIN_BLOCK and
 * SWIG_PYTHON_THREAD_END_BLOCK everywhere - but this is error prone since we
 * have to ensure that SWIG_PYTHON_THREAD_END_BLOCK is called before every
 * return statement in a method.
 *
 * NOTE: This wont work with plain-old C.
 */
#define SWIG_PYTHON_THREAD_SCOPED_BLOCK   SWIG_PYTHON_THREAD_BEGIN_BLOCK

#include <complex>
#include <string>

#include "config.h"
#include "meep/vec.hpp"
#include "meep.hpp"
#include "meep/mympi.hpp"
#include "ctl-math.h"
#include "ctlgeom.h"
#include "meepgeom.hpp"
#include "meep-python.hpp"

namespace meep {
    size_t dft_chunks_Ntotal(dft_chunk *dft_chunks, size_t *my_start);
    typedef std::complex<double> (*amplitude_function)(const vec &);
}

#ifdef HAVE_MPB
#include "mpb.h"

namespace meep {
    struct eigenmode_data {
        maxwell_data *mdata;
        scalar_complex *fft_data_H, *fft_data_E;
        evectmatrix H;
        int n[3];
        double s[3];
        double Gk[3];
        vec center;
        amplitude_function amp_func;
        int band_num;
        double frequency;
        double group_velocity;
    };
}
#else
namespace meep {
    struct eigenmode_data {};
}
#endif

using namespace meep;
using namespace meep_geom;

extern boolean point_in_objectp(vector3 p, GEOMETRIC_OBJECT o);
extern boolean point_in_periodic_objectp(vector3 p, GEOMETRIC_OBJECT o);
void display_geometric_object_info(int indentby, GEOMETRIC_OBJECT o);



#ifndef SWIG_FILE_WITH_INIT
#define NO_IMPORT_ARRAY
#endif
#include "stdio.h"
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#include <numpy/arrayobject.h>


#include <complex> 


#include <iostream>

#if PY_VERSION_HEX >= 0x03020000
# define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj))
#else
# define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj))
#endif


#include <typeinfo>
#include <stdexcept>


#if defined(__GNUC__)
#  if __GNUC__ == 2 && __GNUC_MINOR <= 96
#     define SWIG_STD_NOMODERN_STL
#  endif
#endif


#include <string>


#include <stddef.h>


namespace swig {
  struct stop_iteration {
  };

  struct SwigPyIterator {
  private:
    SwigPtr_PyObject _seq;

  protected:
    SwigPyIterator(PyObject *seq) : _seq(seq)
    {
    }
      
  public:
    virtual ~SwigPyIterator() {}

    // Access iterator method, required by Python
    virtual PyObject *value() const = 0;

    // Forward iterator method, required by Python
    virtual SwigPyIterator *incr(size_t n = 1) = 0;
    
    // Backward iterator method, very common in C++, but not required in Python
    virtual SwigPyIterator *decr(size_t /*n*/ = 1)
    {
      throw stop_iteration();
    }

    // Random access iterator methods, but not required in Python
    virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
    {
      throw std::invalid_argument("operation not supported");
    }

    virtual bool equal (const SwigPyIterator &/*x*/) const
    {
      throw std::invalid_argument("operation not supported");
    }
    
    // C++ common/needed methods
    virtual SwigPyIterator *copy() const = 0;

    PyObject *next()     
    {
      SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads       
      PyObject *obj = value();
      incr();       
      SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads
      return obj;     
    }

    /* Make an alias for Python 3.x */
    PyObject *__next__()
    {
      return next();
    }

    PyObject *previous()
    {
      SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads       
      decr();
      PyObject *obj = value();
      SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads       
      return obj;
    }

    SwigPyIterator *advance(ptrdiff_t n)
    {
      return  (n > 0) ?  incr(n) : decr(-n);
    }
      
    bool operator == (const SwigPyIterator& x)  const
    {
      return equal(x);
    }
      
    bool operator != (const SwigPyIterator& x) const
    {
      return ! operator==(x);
    }
      
    SwigPyIterator& operator += (ptrdiff_t n)
    {
      return *advance(n);
    }

    SwigPyIterator& operator -= (ptrdiff_t n)
    {
      return *advance(-n);
    }
      
    SwigPyIterator* operator + (ptrdiff_t n) const
    {
      return copy()->advance(n);
    }

    SwigPyIterator* operator - (ptrdiff_t n) const
    {
      return copy()->advance(-n);
    }
      
    ptrdiff_t operator - (const SwigPyIterator& x) const
    {
      return x.distance(*this);
    }
      
    static swig_type_info* descriptor() {
      static int init = 0;
      static swig_type_info* desc = 0;
      if (!init) {
	desc = SWIG_TypeQuery("swig::SwigPyIterator *");
	init = 1;
      }	
      return desc;
    }    
  };

#if defined(SWIGPYTHON_BUILTIN)
  inline PyObject* make_output_iterator_builtin (PyObject *pyself)
  {
    Py_INCREF(pyself);
    return pyself;
  }
#endif
}


SWIGINTERN int
SWIG_AsVal_double (PyObject *obj, double *val)
{
  int res = SWIG_TypeError;
  if (PyFloat_Check(obj)) {
    if (val) *val = PyFloat_AsDouble(obj);
    return SWIG_OK;
#if PY_VERSION_HEX < 0x03000000
  } else if (PyInt_Check(obj)) {
    if (val) *val = (double) PyInt_AsLong(obj);
    return SWIG_OK;
#endif
  } else if (PyLong_Check(obj)) {
    double v = PyLong_AsDouble(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    int dispatch = 0;
    double d = PyFloat_AsDouble(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = d;
      return SWIG_AddCast(SWIG_OK);
    } else {
      PyErr_Clear();
    }
    if (!dispatch) {
      long v = PyLong_AsLong(obj);
      if (!PyErr_Occurred()) {
	if (val) *val = v;
	return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
      } else {
	PyErr_Clear();
      }
    }
  }
#endif
  return res;
}


#include <float.h>


#include <math.h>


SWIGINTERNINLINE int
SWIG_CanCastAsInteger(double *d, double min, double max) {
  double x = *d;
  if ((min <= x && x <= max)) {
   double fx = floor(x);
   double cx = ceil(x);
   double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
   if ((errno == EDOM) || (errno == ERANGE)) {
     errno = 0;
   } else {
     double summ, reps, diff;
     if (rd < x) {
       diff = x - rd;
     } else if (rd > x) {
       diff = rd - x;
     } else {
       return 1;
     }
     summ = rd + x;
     reps = diff/summ;
     if (reps < 8*DBL_EPSILON) {
       *d = rd;
       return 1;
     }
   }
  }
  return 0;
}


SWIGINTERN int
SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) 
{
#if PY_VERSION_HEX < 0x03000000
  if (PyInt_Check(obj)) {
    long v = PyInt_AsLong(obj);
    if (v >= 0) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      return SWIG_OverflowError;
    }
  } else
#endif
  if (PyLong_Check(obj)) {
    unsigned long v = PyLong_AsUnsignedLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
      return SWIG_OverflowError;
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    int dispatch = 0;
    unsigned long v = PyLong_AsUnsignedLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_AddCast(SWIG_OK);
    } else {
      PyErr_Clear();
    }
    if (!dispatch) {
      double d;
      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
	if (val) *val = (unsigned long)(d);
	return res;
      }
    }
  }
#endif
  return SWIG_TypeError;
}


#include <limits.h>
#if !defined(SWIG_NO_LLONG_MAX)
# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
#   define LLONG_MAX __LONG_LONG_MAX__
#   define LLONG_MIN (-LLONG_MAX - 1LL)
#   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
# endif
#endif


#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
#  define SWIG_LONG_LONG_AVAILABLE
#endif


#ifdef SWIG_LONG_LONG_AVAILABLE
SWIGINTERN int
SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val)
{
  int res = SWIG_TypeError;
  if (PyLong_Check(obj)) {
    unsigned long long v = PyLong_AsUnsignedLongLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
      res = SWIG_OverflowError;
    }
  } else {
    unsigned long v;
    res = SWIG_AsVal_unsigned_SS_long (obj,&v);
    if (SWIG_IsOK(res)) {
      if (val) *val = v;
      return res;
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    const double mant_max = 1LL << DBL_MANT_DIG;
    double d;
    res = SWIG_AsVal_double (obj,&d);
    if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max))
      return SWIG_OverflowError;
    if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
      if (val) *val = (unsigned long long)(d);
      return SWIG_AddCast(res);
    }
    res = SWIG_TypeError;
  }
#endif
  return res;
}
#endif


SWIGINTERNINLINE int
SWIG_AsVal_size_t (PyObject * obj, size_t *val)
{
  int res = SWIG_TypeError;
#ifdef SWIG_LONG_LONG_AVAILABLE
  if (sizeof(size_t) <= sizeof(unsigned long)) {
#endif
    unsigned long v;
    res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
    if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
#ifdef SWIG_LONG_LONG_AVAILABLE
  } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
    unsigned long long v;
    res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0);
    if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
  }
#endif
  return res;
}


  #define SWIG_From_long   PyInt_FromLong 


#ifdef SWIG_LONG_LONG_AVAILABLE
SWIGINTERNINLINE PyObject* 
SWIG_From_long_SS_long  (long long value)
{
  return ((value < LONG_MIN) || (value > LONG_MAX)) ?
    PyLong_FromLongLong(value) : PyInt_FromLong(static_cast< long >(value));
}
#endif


SWIGINTERNINLINE PyObject *
SWIG_From_ptrdiff_t  (ptrdiff_t value)
{    
#ifdef SWIG_LONG_LONG_AVAILABLE
  if (sizeof(ptrdiff_t) <= sizeof(long)) {
#endif
    return SWIG_From_long  (static_cast< long >(value));
#ifdef SWIG_LONG_LONG_AVAILABLE
  } else {
    /* assume sizeof(ptrdiff_t) <= sizeof(long long) */
    return SWIG_From_long_SS_long  (static_cast< long long >(value));
  }
#endif
}


SWIGINTERNINLINE PyObject*
  SWIG_From_bool  (bool value)
{
  return PyBool_FromLong(value ? 1 : 0);
}


SWIGINTERN int
SWIG_AsVal_long (PyObject *obj, long* val)
{
#if PY_VERSION_HEX < 0x03000000
  if (PyInt_Check(obj)) {
    if (val) *val = PyInt_AsLong(obj);
    return SWIG_OK;
  } else
#endif
  if (PyLong_Check(obj)) {
    long v = PyLong_AsLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
      return SWIG_OverflowError;
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    int dispatch = 0;
    long v = PyInt_AsLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_AddCast(SWIG_OK);
    } else {
      PyErr_Clear();
    }
    if (!dispatch) {
      double d;
      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
	if (val) *val = (long)(d);
	return res;
      }
    }
  }
#endif
  return SWIG_TypeError;
}


#ifdef SWIG_LONG_LONG_AVAILABLE
SWIGINTERN int
SWIG_AsVal_long_SS_long (PyObject *obj, long long *val)
{
  int res = SWIG_TypeError;
  if (PyLong_Check(obj)) {
    long long v = PyLong_AsLongLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
      res = SWIG_OverflowError;
    }
  } else {
    long v;
    res = SWIG_AsVal_long (obj,&v);
    if (SWIG_IsOK(res)) {
      if (val) *val = v;
      return res;
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    const double mant_max = 1LL << DBL_MANT_DIG;
    const double mant_min = -mant_max;
    double d;
    res = SWIG_AsVal_double (obj,&d);
    if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, mant_min, mant_max))
      return SWIG_OverflowError;
    if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, mant_min, mant_max)) {
      if (val) *val = (long long)(d);
      return SWIG_AddCast(res);
    }
    res = SWIG_TypeError;
  }
#endif
  return res;
}
#endif


SWIGINTERNINLINE int
SWIG_AsVal_ptrdiff_t (PyObject * obj, ptrdiff_t *val)
{
  int res = SWIG_TypeError;
#ifdef SWIG_LONG_LONG_AVAILABLE
  if (sizeof(ptrdiff_t) <= sizeof(long)) {
#endif
    long v;
    res = SWIG_AsVal_long (obj, val ? &v : 0);
    if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v);
#ifdef SWIG_LONG_LONG_AVAILABLE
  } else if (sizeof(ptrdiff_t) <= sizeof(long long)) {
    long long v;
    res = SWIG_AsVal_long_SS_long (obj, val ? &v : 0);
    if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v);
  }
#endif
  return res;
}


#include <algorithm>


#include <vector>


typedef struct {
    PyObject *func;
    int num_components;
} py_field_func_data;


#include "typemap_utils.cpp"

static PyObject *py_source_time_object() {
    // Return value: Borrowed reference
    static PyObject *source_time_object = NULL;
    if (source_time_object == NULL) {
        PyObject *source_mod = PyImport_ImportModule("meep.source");
        source_time_object = PyObject_GetAttrString(source_mod, "SourceTime");
        Py_XDECREF(source_mod);
    }
    return source_time_object;
}

static PyObject *py_meep_src_time_object() {
    // Return value: Borrowed reference
    static PyObject *src_time = NULL;
    if (src_time == NULL) {
        PyObject *meep_mod = PyImport_ImportModule("meep");
        src_time = PyObject_GetAttrString(meep_mod, "src_time");
        Py_XDECREF(meep_mod);
    }
    return src_time;
}

static double py_callback_wrap(const meep::vec &v) {
    SWIG_PYTHON_THREAD_SCOPED_BLOCK;
    PyObject *pyv = vec2py(v);
    PyObject *pyret = PyObject_CallFunctionObjArgs(py_callback, pyv, NULL);
    double ret = PyFloat_AsDouble(pyret);
    Py_DECREF(pyv);
    Py_XDECREF(pyret);
    return ret;
}

static std::complex<double> py_amp_func_wrap(const meep::vec &v) {
    SWIG_PYTHON_THREAD_SCOPED_BLOCK;
    PyObject *pyv = vec2py(v);
    PyObject *pyret = PyObject_CallFunctionObjArgs(py_amp_func, pyv, NULL);
    double real = PyComplex_RealAsDouble(pyret);
    double imag = PyComplex_ImagAsDouble(pyret);
    std::complex<double> ret(real, imag);
    Py_DECREF(pyv);
    Py_DECREF(pyret);
    return ret;
}

static std::complex<double> py_field_func_wrap(const std::complex<meep::realnum> *fields,
                                               const meep::vec &loc,
                                               void *data_) {
    SWIG_PYTHON_THREAD_SCOPED_BLOCK;
    PyObject *pyv = vec2py(loc);

    py_field_func_data *data = (py_field_func_data *)data_;
    int len = data->num_components;

    PyObject *py_args = PyTuple_New(len + 1);
    // Increment here because PyTuple_SetItem steals a reference
    Py_INCREF(pyv);
    PyTuple_SetItem(py_args, 0, pyv);

    for (Py_ssize_t i = 1; i < len + 1; i++) {
        PyObject *cmplx = PyComplex_FromDoubles(fields[i - 1].real(), fields[i - 1].imag());
        PyTuple_SetItem(py_args, i, cmplx);
    }

    PyObject *pyret = PyObject_CallObject(data->func, py_args);

    if (!pyret) { abort_with_stack_trace(); }

    double real = PyComplex_RealAsDouble(pyret);
    double imag = PyComplex_ImagAsDouble(pyret);
    std::complex<double> ret(real, imag);
    Py_DECREF(pyv);
    Py_DECREF(pyret);
    Py_DECREF(py_args);
    return ret;
}

static meep::vec py_kpoint_func_wrap(double freq, int mode, void *user_data) {
    SWIG_PYTHON_THREAD_SCOPED_BLOCK;
    PyObject *py_freq = PyFloat_FromDouble(freq);
    PyObject *py_mode = PyInteger_FromLong(mode);

    PyObject *py_result = PyObject_CallFunctionObjArgs((PyObject*)user_data, py_freq, py_mode, NULL);

    meep::vec result;

    if (!py_result) {
        PyErr_PrintEx(0);
        result = meep::vec(0, 0, 0);
    } else {
        vector3 v3;
        if (!pyv3_to_v3(py_result, &v3)) {
            PyErr_PrintEx(0);
            result = meep::vec(0, 0, 0);
        } else {
            result = meep::vec(v3.x, v3.y, v3.z);
        }
        Py_XDECREF(py_result);
    }

    Py_DECREF(py_freq);
    Py_DECREF(py_mode);
    return result;
}

static void _do_master_printf(const char* stream_name, const char* text) {
    SWIG_PYTHON_THREAD_SCOPED_BLOCK;
    PyObject *py_stream = PySys_GetObject((char*)stream_name); // arg is non-const on Python2

    Py_XDECREF(PyObject_CallMethod(py_stream, "write", "(s)", text));
    Py_XDECREF(PyObject_CallMethod(py_stream, "flush", NULL));
}

void py_master_printf_wrap(const char *s) {
    _do_master_printf("stdout", s);
}

void py_master_printf_stderr_wrap(const char *s) {
    _do_master_printf("stderr", s);
}

void set_ctl_printf_callback(void (*callback)(const char *s)) {
#if HAVE_CTL_PRINTF_CALLBACK
  ctl_printf_callback = callback;
#else
  (void)callback;
#endif
}

void set_mpb_printf_callback(void (*callback)(const char *s)) {
#if HAVE_MPB_PRINTF_CALLBACK
  mpb_printf_callback = callback;
#else
  (void)callback;
#endif
}

static int pyabsorber_to_absorber(PyObject *py_absorber, meep_geom::absorber *a) {

    if (!get_attr_dbl(py_absorber, &a->thickness, "thickness") ||
        !get_attr_int(py_absorber, &a->direction, "direction") ||
        !get_attr_int(py_absorber, &a->side, "side") ||
        !get_attr_dbl(py_absorber, &a->R_asymptotic, "R_asymptotic") ||
        !get_attr_dbl(py_absorber, &a->mean_stretch, "mean_stretch")) {

        return 0;
    }

    PyObject *py_pml_profile_func = PyObject_GetAttrString(py_absorber, "pml_profile");

    if (!py_pml_profile_func) {
      meep::abort("Class attribute 'pml_profile' is None\n");
    }

    a->pml_profile_data = py_pml_profile_func;

    return 1;
}

// Wrapper for Python PML profile function
double py_pml_profile(double u, void *f) {
    SWIG_PYTHON_THREAD_SCOPED_BLOCK;
    PyObject *func = (PyObject *)f;
    PyObject *d = PyFloat_FromDouble(u);

    PyObject *pyret = PyObject_CallFunctionObjArgs(func, d, NULL);

    if (!pyret) { abort_with_stack_trace(); }

    double ret = PyFloat_AsDouble(pyret);
    Py_XDECREF(pyret);
    Py_XDECREF(d);
    return ret;
}

PyObject *py_do_harminv(PyObject *vals, double dt, double f_min, double f_max, int maxbands,
                     double spectral_density, double Q_thresh, double rel_err_thresh,
                     double err_thresh, double rel_amp_thresh, double amp_thresh) {
    // Return value: New reference

    std::complex<double> *amp = new std::complex<double>[maxbands];
    double *freq_re = new double[maxbands];
    double *freq_im = new double[maxbands];
    double *freq_err = new double[maxbands];

    Py_ssize_t n = PyList_Size(vals);
    std::complex<double> *items = new std::complex<double>[n];

    for(int i = 0; i < n; i++) {
        Py_complex py_c = PyComplex_AsCComplex(PyList_GetItem(vals, i));
        std::complex<double> c(py_c.real, py_c.imag);
        items[i] = c;
    }

    maxbands = do_harminv(items, n, dt, f_min, f_max, maxbands, amp,
                          freq_re, freq_im, freq_err, spectral_density, Q_thresh,
                          rel_err_thresh, err_thresh, rel_amp_thresh, amp_thresh);

    PyObject *res = PyList_New(maxbands);

    for(int i = 0; i < maxbands; i++) {
        Py_complex pyfreq = {freq_re[i], freq_im[i]};
        Py_complex pyamp = {amp[i].real(), amp[i].imag()};
        Py_complex pyfreq_err = {freq_err[i], 0};

        PyObject *pyobj = Py_BuildValue("(DDD)", &pyfreq, &pyamp, &pyfreq_err);
        PyList_SetItem(res, i, pyobj);
    }

    delete[] freq_err;
    delete[] freq_im;
    delete[] freq_re;
    delete[] amp;
    delete[] items;

    return res;
}

// Wrapper around meep::dft_near2far::farfield
PyObject *_get_farfield(meep::dft_near2far *f, const meep::vec & v) {
    // Return value: New reference
    Py_ssize_t len = f->freq.size() * 6;
    PyObject *res = PyList_New(len);

    std::complex<double> *ff_arr = f->farfield(v);

    for (Py_ssize_t i = 0; i < len; i++) {
        PyList_SetItem(res, i, PyComplex_FromDoubles(ff_arr[i].real(), ff_arr[i].imag()));
    }

    delete[] ff_arr;

    return res;
}

// Wrapper around meep::dft_near2far::get_farfields_array
PyObject *_get_farfields_array(meep::dft_near2far *n2f, const meep::volume &where,
                               double resolution) {
    // Return value: New reference
    size_t dims[4] = {1, 1, 1, 1};
    int rank = 0;
    size_t N = 1;

    double *EH = n2f->get_farfields_array(where, rank, dims, N, resolution);

    if (!EH) return PyArray_SimpleNew(0, 0, NPY_CDOUBLE);

    // frequencies are the last dimension
    if (n2f->freq.size() > 1) dims[rank++] = n2f->freq.size();

    // Additional rank to store all 12 E/H x/y/z r/i arrays.
    rank++;
    npy_intp *arr_dims = new npy_intp[rank];
    arr_dims[0] = 12;
    for (int i = 1; i < rank; ++i) {
        arr_dims[i] = dims[i - 1];
    }

    PyObject *py_arr = PyArray_SimpleNew(rank, arr_dims, NPY_DOUBLE);
    memcpy(PyArray_DATA((PyArrayObject*)py_arr), EH, sizeof(double) * 2 * N * 6 * n2f->freq.size());

    delete[] arr_dims;
    delete[] EH;
    return py_arr;

}

// Wrapper around meep::dft_ldos::ldos
PyObject *_dft_ldos_ldos(meep::dft_ldos *f) {
    // Return value: New reference
    Py_ssize_t len = f->freq.size();
    PyObject *res = PyList_New(len);

    double *tmp = f->ldos();

    for (Py_ssize_t i = 0; i < len; i++) {
        PyList_SetItem(res, i, PyFloat_FromDouble(tmp[i]));
    }

    delete[] tmp;

    return res;
}

// Wrapper around meep::dft_ldos_F
PyObject *_dft_ldos_F(meep::dft_ldos *f) {
    // Return value: New reference
    Py_ssize_t len = f->freq.size();
    PyObject *res = PyList_New(len);

    std::complex<double> *tmp = f->F();

    for (Py_ssize_t i = 0; i < len; i++) {
        PyList_SetItem(res, i, PyComplex_FromDoubles(tmp[i].real(), tmp[i].imag()));
    }

    delete[] tmp;

    return res;
}

// Wrapper arond meep::dft_ldos_J
PyObject *_dft_ldos_J(meep::dft_ldos *f) {
    // Return value: New reference
    Py_ssize_t len = f->freq.size();
    PyObject *res = PyList_New(len);

    std::complex<double> *tmp = f->J();

    for (Py_ssize_t i = 0; i < len; i++) {
        PyList_SetItem(res, i, PyComplex_FromDoubles(tmp[i].real(), tmp[i].imag()));
    }

    delete[] tmp;

    return res;
}

/* This is a wrapper function to fool SWIG...since our list constructor
   takes ownership of the next pointer, we have to make sure that SWIG
   does not garbage-collect volume_list objects.  We do
   this by wrapping a "helper" function around the constructor which
   does not have the %newobject SWIG attribute.   Note that we then
   need to deallocate the list explicitly in Python. */
meep::volume_list *make_volume_list(const meep::volume &v, int c,
                                    std::complex<double> weight,
                                    meep::volume_list *next) {

    return new meep::volume_list(v, c, weight, next);
}

template<typename dft_type>
PyObject *_get_dft_array(meep::fields *f, dft_type dft, meep::component c, int num_freq) {
    // Return value: New reference
    int rank;
    size_t dims[3];
    std::complex<meep::realnum> *dft_arr = f->get_dft_array(dft, c, num_freq, &rank, dims);

    if (dft_arr == NULL) { // this can happen e.g. if component c vanishes by symmetry
      std::complex<double> d[1] = {std::complex<double>(0,0)};
      return PyArray_SimpleNewFromData(0, 0, sizeof(meep::realnum) == sizeof(float) ? NPY_CFLOAT : NPY_CDOUBLE, d);
    }

    if (rank == 0) // singleton results
      return PyArray_SimpleNewFromData(0, 0, sizeof(meep::realnum) == sizeof(float) ? NPY_CFLOAT : NPY_CDOUBLE, dft_arr);

    size_t length = 1;
    npy_intp *arr_dims = new npy_intp[rank];
    for (int i = 0; i < rank; ++i) {
         arr_dims[i] = dims[i];       // implicit size_t -> int cast, presumed safe for individual array dimensions
         length *= dims[i];
    }

    PyObject *py_arr = PyArray_SimpleNew(rank, arr_dims, sizeof(meep::realnum) == sizeof(float) ? NPY_CFLOAT : NPY_CDOUBLE);
    memcpy(PyArray_DATA((PyArrayObject*)py_arr), dft_arr, sizeof(std::complex<meep::realnum>) * length);
    delete[] dft_arr;
    if (arr_dims) delete[] arr_dims;

    return py_arr;
}

size_t _get_dft_data_size(meep::dft_chunk *dc) {
    size_t istart;
    return meep::dft_chunks_Ntotal(dc, &istart) / 2;
}

void _get_dft_data(meep::dft_chunk *dc, std::complex<double> *cdata, int size) {
    size_t istart;
    size_t n = meep::dft_chunks_Ntotal(dc, &istart) / 2;
    istart /= 2;

    if (n != (size_t)size) {
        meep::abort("Total dft_chunks size does not agree with size allocated for output array.\n");
    }

    for (meep::dft_chunk *cur = dc; cur; cur = cur->next_in_dft) {
        size_t Nchunk = cur->N * cur->omega.size();
        for (size_t i = 0; i < Nchunk; ++i) {
            cdata[i + istart] = cur->dft[i];
        }
        istart += Nchunk;
    }
}

void _load_dft_data(meep::dft_chunk *dc, std::complex<double> *cdata, int size) {
    size_t istart;
    size_t n = meep::dft_chunks_Ntotal(dc, &istart) / 2;
    istart /= 2;

    if (n != (size_t)size) {
        meep::abort("Total dft_chunks size does not agree with size allocated for output array.\n");
    }

    for (meep::dft_chunk *cur = dc; cur; cur = cur->next_in_dft) {
        size_t Nchunk = cur->N * cur->omega.size();
        for (size_t i = 0; i < Nchunk; ++i) {
            cur->dft[i] = cdata[i + istart];
        }
        istart += Nchunk;
    }
}

struct kpoint_list {
    meep::vec *kpoints;
    size_t n;
    meep::vec *kdom;
    size_t num_bands;
};

kpoint_list get_eigenmode_coefficients_and_kpoints(meep::fields *f, meep::dft_flux flux, const meep::volume &eig_vol,
                                                   int *bands, int num_bands, int parity, double eig_resolution,
                                                   double eigensolver_tol, std::complex<double> *coeffs,
                                                   double *vgrp, meep::kpoint_func user_kpoint_func,
                                                   void *user_kpoint_data, double *cscale, meep::direction d) {

    size_t num_kpoints = num_bands * flux.freq.size();
    meep::vec *kpoints = new meep::vec[num_kpoints];
    meep::vec *kdom = new meep::vec[num_kpoints];

    f->get_eigenmode_coefficients(flux, eig_vol, bands, num_bands, parity, eig_resolution, eigensolver_tol,
                                  coeffs, vgrp, user_kpoint_func, user_kpoint_data, kpoints, kdom, cscale, d);

    kpoint_list res = {kpoints, num_kpoints, kdom, num_kpoints};

    return res;
}

kpoint_list get_eigenmode_coefficients_and_kpoints(meep::fields *f, meep::dft_flux flux, const meep::volume &eig_vol,
                                                   meep::diffractedplanewave dp, int parity, double eig_resolution,
                                                   double eigensolver_tol, std::complex<double> *coeffs,
                                                   double *vgrp, meep::kpoint_func user_kpoint_func,
                                                   void *user_kpoint_data, double *cscale, meep::direction d) {

    size_t num_kpoints = flux.freq.size();
    meep::vec *kpoints = new meep::vec[num_kpoints];
    meep::vec *kdom = new meep::vec[num_kpoints];
    f->get_eigenmode_coefficients(flux, eig_vol, NULL, 1, parity, eig_resolution, eigensolver_tol,
                                  coeffs, vgrp, user_kpoint_func, user_kpoint_data, kpoints, kdom, cscale, d, &dp);

    kpoint_list res = {kpoints, num_kpoints, kdom, num_kpoints};

    return res;
}

PyObject *_get_array_slice_dimensions(meep::fields *f, const meep::volume &where, size_t dims[3],
                                      bool collapse_empty_dimensions, bool snap_empty_dimensions,
                                      meep::component cgrid = Centered, PyObject *min_max_loc = NULL) {
    // Return value: New reference
    meep::direction dirs[3] = {meep::X, meep::X, meep::X};

    meep::vec min_max_loc_vec[2];
    meep::vec* min_max_loc_vec_ptr = min_max_loc_vec;
    if (!min_max_loc) min_max_loc_vec_ptr = NULL;

    int rank = f->get_array_slice_dimensions(where, dims, dirs, collapse_empty_dimensions, snap_empty_dimensions, min_max_loc_vec_ptr, 0, cgrid);

    PyObject *py_dirs = PyList_New(3);
    for (Py_ssize_t i = 0; i < 3; ++i) {
        PyList_SetItem(py_dirs, i, PyInteger_FromLong(static_cast<int>(dirs[i])));
    }

    if (min_max_loc){
        PyObject * py_min = vec2py(min_max_loc_vec[0],true);
        PyObject * py_max = vec2py(min_max_loc_vec[1],true);
        PyList_Append(min_max_loc, py_min);
        PyList_Append(min_max_loc, py_max);
        Py_DECREF(py_min);
        Py_DECREF(py_max);
    }

    PyObject *rval = Py_BuildValue("(iO)", rank, py_dirs);
    Py_DECREF(py_dirs);
    return rval;
}

#ifdef HAVE_MPB
meep::eigenmode_data *_get_eigenmode(meep::fields *f, double frequency, meep::direction d, const meep::volume where,
                                     const meep::volume eig_vol, int band_num, const meep::vec &_kpoint,
                                     bool match_frequency, int parity, double resolution, double eigensolver_tol,
                                     double kdom[3]) {

    void *data = f->get_eigenmode(frequency, d, where, eig_vol, band_num, _kpoint, match_frequency,
                                  parity, resolution, eigensolver_tol, kdom);
    return (meep::eigenmode_data *)data;
}

PyObject *_get_eigenmode_Gk(meep::eigenmode_data *emdata) {
    SWIG_PYTHON_THREAD_SCOPED_BLOCK;
    // Return value: New reference
    PyObject *v3_class = py_vector3_object();
    PyObject *args = Py_BuildValue("(ddd)", emdata->Gk[0], emdata->Gk[1], emdata->Gk[2]);
    PyObject *result = PyObject_Call(v3_class, args, NULL);
    Py_DECREF(args);
    return result;
}

#else
void _get_eigenmode(meep::fields *f, double frequency, meep::direction d, const meep::volume where,
                    const meep::volume eig_vol, int band_num, const meep::vec &_kpoint,
                    bool match_frequency, int parity, double resolution, double eigensolver_tol,
                    double kdom[3]) {
    (void) f; (void) frequency; (void) d; (void) where; (void) eig_vol; (void) band_num; (void) _kpoint;
    (void) match_frequency; (void) parity; (void) resolution; (void) eigensolver_tol;
    (void) kdom;
    meep::abort("Must compile Meep with MPB for get_eigenmode");
}
#endif


SWIGINTERN int
SWIG_AsVal_int (PyObject * obj, int *val)
{
  long v;
  int res = SWIG_AsVal_long (obj, &v);
  if (SWIG_IsOK(res)) {
    if ((v < INT_MIN || v > INT_MAX)) {
      return SWIG_OverflowError;
    } else {
      if (val) *val = static_cast< int >(v);
    }
  }  
  return res;
}


SWIGINTERNINLINE PyObject* 
SWIG_From_unsigned_SS_long  (unsigned long value)
{
  return (value > LONG_MAX) ?
    PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value));
}


#ifdef SWIG_LONG_LONG_AVAILABLE
SWIGINTERNINLINE PyObject* 
SWIG_From_unsigned_SS_long_SS_long  (unsigned long long value)
{
  return (value > LONG_MAX) ?
    PyLong_FromUnsignedLongLong(value) : PyInt_FromLong(static_cast< long >(value));
}
#endif


SWIGINTERNINLINE PyObject *
SWIG_From_size_t  (size_t value)
{    
#ifdef SWIG_LONG_LONG_AVAILABLE
  if (sizeof(size_t) <= sizeof(unsigned long)) {
#endif
    return SWIG_From_unsigned_SS_long  (static_cast< unsigned long >(value));
#ifdef SWIG_LONG_LONG_AVAILABLE
  } else {
    /* assume sizeof(size_t) <= sizeof(unsigned long long) */
    return SWIG_From_unsigned_SS_long_SS_long  (static_cast< unsigned long long >(value));
  }
#endif
}


#if NPY_API_VERSION < 0x00000007
#define NPY_ARRAY_DEFAULT NPY_DEFAULT
#define NPY_ARRAY_FARRAY  NPY_FARRAY
#define NPY_FORTRANORDER  NPY_FORTRAN
#endif


/* Macros to extract array attributes.
 */
#if NPY_API_VERSION < 0x00000007
#define is_array(a)            ((a) && PyArray_Check((PyArrayObject*)a))
#define array_type(a)          (int)(PyArray_TYPE((PyArrayObject*)a))
#define array_numdims(a)       (((PyArrayObject*)a)->nd)
#define array_dimensions(a)    (((PyArrayObject*)a)->dimensions)
#define array_size(a,i)        (((PyArrayObject*)a)->dimensions[i])
#define array_strides(a)       (((PyArrayObject*)a)->strides)
#define array_stride(a,i)      (((PyArrayObject*)a)->strides[i])
#define array_data(a)          (((PyArrayObject*)a)->data)
#define array_descr(a)         (((PyArrayObject*)a)->descr)
#define array_flags(a)         (((PyArrayObject*)a)->flags)
#define array_enableflags(a,f) (((PyArrayObject*)a)->flags) = f
#define array_is_fortran(a)    (PyArray_ISFORTRAN((PyArrayObject*)a))
#else
#define is_array(a)            ((a) && PyArray_Check(a))
#define array_type(a)          PyArray_TYPE((PyArrayObject*)a)
#define array_numdims(a)       PyArray_NDIM((PyArrayObject*)a)
#define array_dimensions(a)    PyArray_DIMS((PyArrayObject*)a)
#define array_strides(a)       PyArray_STRIDES((PyArrayObject*)a)
#define array_stride(a,i)      PyArray_STRIDE((PyArrayObject*)a,i)
#define array_size(a,i)        PyArray_DIM((PyArrayObject*)a,i)
#define array_data(a)          PyArray_DATA((PyArrayObject*)a)
#define array_descr(a)         PyArray_DESCR((PyArrayObject*)a)
#define array_flags(a)         PyArray_FLAGS((PyArrayObject*)a)
#define array_enableflags(a,f) PyArray_ENABLEFLAGS((PyArrayObject*)a,f)
#define array_is_fortran(a)    (PyArray_IS_F_CONTIGUOUS((PyArrayObject*)a))
#endif
#define array_is_contiguous(a) (PyArray_ISCONTIGUOUS((PyArrayObject*)a))
#define array_is_native(a)     (PyArray_ISNOTSWAPPED((PyArrayObject*)a))


  /* Given a PyObject, return a string describing its type.
   */
  const char* pytype_string(PyObject* py_obj)
  {
    if (py_obj == NULL          ) return "C NULL value";
    if (py_obj == Py_None       ) return "Python None" ;
    if (PyCallable_Check(py_obj)) return "callable"    ;
    if (PyString_Check(  py_obj)) return "string"      ;
    if (PyInt_Check(     py_obj)) return "int"         ;
    if (PyFloat_Check(   py_obj)) return "float"       ;
    if (PyDict_Check(    py_obj)) return "dict"        ;
    if (PyList_Check(    py_obj)) return "list"        ;
    if (PyTuple_Check(   py_obj)) return "tuple"       ;
#if PY_MAJOR_VERSION < 3
    if (PyFile_Check(    py_obj)) return "file"        ;
    if (PyModule_Check(  py_obj)) return "module"      ;
    if (PyInstance_Check(py_obj)) return "instance"    ;
#endif

    return "unknown type";
  }

  /* Given a NumPy typecode, return a string describing the type.
   */
  const char* typecode_string(int typecode)
  {
    static const char* type_names[25] = {"bool",
                                         "byte",
                                         "unsigned byte",
                                         "short",
                                         "unsigned short",
                                         "int",
                                         "unsigned int",
                                         "long",
                                         "unsigned long",
                                         "long long",
                                         "unsigned long long",
                                         "float",
                                         "double",
                                         "long double",
                                         "complex float",
                                         "complex double",
                                         "complex long double",
                                         "object",
                                         "string",
                                         "unicode",
                                         "void",
                                         "ntypes",
                                         "notype",
                                         "char",
                                         "unknown"};
    return typecode < 24 ? type_names[typecode] : type_names[24];
  }

  /* Make sure input has correct numpy type.  This now just calls
     PyArray_EquivTypenums().
   */
  int type_match(int actual_type,
                 int desired_type)
  {
    return PyArray_EquivTypenums(actual_type, desired_type);
  }

#ifdef SWIGPY_USE_CAPSULE
  void free_cap(PyObject * cap)
  {
    void* array = (void*) PyCapsule_GetPointer(cap,SWIGPY_CAPSULE_NAME);
    if (array != NULL) free(array);
  }
#endif




  /* Given a PyObject pointer, cast it to a PyArrayObject pointer if
   * legal.  If not, set the python error string appropriately and
   * return NULL.
   */
  PyArrayObject* obj_to_array_no_conversion(PyObject* input,
                                            int        typecode)
  {
    PyArrayObject* ary = NULL;
    if (is_array(input) && (typecode == NPY_NOTYPE ||
                            PyArray_EquivTypenums(array_type(input), typecode)))
    {
      ary = (PyArrayObject*) input;
    }
    else if is_array(input)
    {
      const char* desired_type = typecode_string(typecode);
      const char* actual_type  = typecode_string(array_type(input));
      PyErr_Format(PyExc_TypeError,
                   "Array of type '%s' required.  Array of type '%s' given",
                   desired_type, actual_type);
      ary = NULL;
    }
    else
    {
      const char* desired_type = typecode_string(typecode);
      const char* actual_type  = pytype_string(input);
      PyErr_Format(PyExc_TypeError,
                   "Array of type '%s' required.  A '%s' was given",
                   desired_type,
                   actual_type);
      ary = NULL;
    }
    return ary;
  }

  /* Convert the given PyObject to a NumPy array with the given
   * typecode.  On success, return a valid PyArrayObject* with the
   * correct type.  On failure, the python error string will be set and
   * the routine returns NULL.
   */
  PyArrayObject* obj_to_array_allow_conversion(PyObject* input,
                                               int       typecode,
                                               int*      is_new_object)
  {
    PyArrayObject* ary = NULL;
    PyObject*      py_obj;
    if (is_array(input) && (typecode == NPY_NOTYPE ||
                            PyArray_EquivTypenums(array_type(input),typecode)))
    {
      ary = (PyArrayObject*) input;
      *is_new_object = 0;
    }
    else
    {
      py_obj = PyArray_FROMANY(input, typecode, 0, 0, NPY_ARRAY_DEFAULT);
      /* If NULL, PyArray_FromObject will have set python error value.*/
      ary = (PyArrayObject*) py_obj;
      *is_new_object = 1;
    }
    return ary;
  }

  /* Given a PyArrayObject, check to see if it is contiguous.  If so,
   * return the input pointer and flag it as not a new object.  If it is
   * not contiguous, create a new PyArrayObject using the original data,
   * flag it as a new object and return the pointer.
   */
  PyArrayObject* make_contiguous(PyArrayObject* ary,
                                 int*           is_new_object,
                                 int            min_dims,
                                 int            max_dims)
  {
    PyArrayObject* result;
    if (array_is_contiguous(ary))
    {
      result = ary;
      *is_new_object = 0;
    }
    else
    {
      result = (PyArrayObject*) PyArray_ContiguousFromObject((PyObject*)ary,
                                                              array_type(ary),
                                                              min_dims,
                                                              max_dims);
      *is_new_object = 1;
    }
    return result;
  }

  /* Given a PyArrayObject, check to see if it is Fortran-contiguous.
   * If so, return the input pointer, but do not flag it as not a new
   * object.  If it is not Fortran-contiguous, create a new
   * PyArrayObject using the original data, flag it as a new object
   * and return the pointer.
   */
  PyArrayObject* make_fortran(PyArrayObject* ary,
                              int*           is_new_object)
  {
    PyArrayObject* result;
    if (array_is_fortran(ary))
    {
      result = ary;
      *is_new_object = 0;
    }
    else
    {
      Py_INCREF(array_descr(ary));
      result = (PyArrayObject*) PyArray_FromArray(ary,
                                                  array_descr(ary),
#if NPY_API_VERSION < 0x00000007
                                                  NPY_FORTRANORDER);
#else
                                                  NPY_ARRAY_F_CONTIGUOUS);
#endif
      *is_new_object = 1;
    }
    return result;
  }

  /* Convert a given PyObject to a contiguous PyArrayObject of the
   * specified type.  If the input object is not a contiguous
   * PyArrayObject, a new one will be created and the new object flag
   * will be set.
   */
  PyArrayObject* obj_to_array_contiguous_allow_conversion(PyObject* input,
                                                          int       typecode,
                                                          int*      is_new_object)
  {
    int is_new1 = 0;
    int is_new2 = 0;
    PyArrayObject* ary2;
    PyArrayObject* ary1 = obj_to_array_allow_conversion(input,
                                                        typecode,
                                                        &is_new1);
    if (ary1)
    {
      ary2 = make_contiguous(ary1, &is_new2, 0, 0);
      if ( is_new1 && is_new2)
      {
        Py_DECREF(ary1);
      }
      ary1 = ary2;
    }
    *is_new_object = is_new1 || is_new2;
    return ary1;
  }

  /* Convert a given PyObject to a Fortran-ordered PyArrayObject of the
   * specified type.  If the input object is not a Fortran-ordered
   * PyArrayObject, a new one will be created and the new object flag
   * will be set.
   */
  PyArrayObject* obj_to_array_fortran_allow_conversion(PyObject* input,
                                                       int       typecode,
                                                       int*      is_new_object)
  {
    int is_new1 = 0;
    int is_new2 = 0;
    PyArrayObject* ary2;
    PyArrayObject* ary1 = obj_to_array_allow_conversion(input,
                                                        typecode,
                                                        &is_new1);
    if (ary1)
    {
      ary2 = make_fortran(ary1, &is_new2);
      if (is_new1 && is_new2)
      {
        Py_DECREF(ary1);
      }
      ary1 = ary2;
    }
    *is_new_object = is_new1 || is_new2;
    return ary1;
  }


  /* Test whether a python object is contiguous.  If array is
   * contiguous, return 1.  Otherwise, set the python error string and
   * return 0.
   */
  int require_contiguous(PyArrayObject* ary)
  {
    int contiguous = 1;
    if (!array_is_contiguous(ary))
    {
      PyErr_SetString(PyExc_TypeError,
                      "Array must be contiguous.  A non-contiguous array was given");
      contiguous = 0;
    }
    return contiguous;
  }

  /* Test whether a python object is (C_ or F_) contiguous.  If array is
   * contiguous, return 1.  Otherwise, set the python error string and
   * return 0.
   */
  int require_c_or_f_contiguous(PyArrayObject* ary)
  {
    int contiguous = 1;
    if (!(array_is_contiguous(ary) || array_is_fortran(ary)))
    {
      PyErr_SetString(PyExc_TypeError,
                      "Array must be contiguous (C_ or F_).  A non-contiguous array was given");
      contiguous = 0;
    }
    return contiguous;
  }

  /* Require that a numpy array is not byte-swapped.  If the array is
   * not byte-swapped, return 1.  Otherwise, set the python error string
   * and return 0.
   */
  int require_native(PyArrayObject* ary)
  {
    int native = 1;
    if (!array_is_native(ary))
    {
      PyErr_SetString(PyExc_TypeError,
                      "Array must have native byteorder.  "
                      "A byte-swapped array was given");
      native = 0;
    }
    return native;
  }

  /* Require the given PyArrayObject to have a specified number of
   * dimensions.  If the array has the specified number of dimensions,
   * return 1.  Otherwise, set the python error string and return 0.
   */
  int require_dimensions(PyArrayObject* ary,
                         int            exact_dimensions)
  {
    int success = 1;
    if (array_numdims(ary) != exact_dimensions)
    {
      PyErr_Format(PyExc_TypeError,
                   "Array must have %d dimensions.  Given array has %d dimensions",
                   exact_dimensions,
                   array_numdims(ary));
      success = 0;
    }
    return success;
  }

  /* Require the given PyArrayObject to have one of a list of specified
   * number of dimensions.  If the array has one of the specified number
   * of dimensions, return 1.  Otherwise, set the python error string
   * and return 0.
   */
  int require_dimensions_n(PyArrayObject* ary,
                           int*           exact_dimensions,
                           int            n)
  {
    int success = 0;
    int i;
    char dims_str[255] = "";
    char s[255];
    for (i = 0; i < n && !success; i++)
    {
      if (array_numdims(ary) == exact_dimensions[i])
      {
        success = 1;
      }
    }
    if (!success)
    {
      for (i = 0; i < n-1; i++)
      {
        sprintf(s, "%d, ", exact_dimensions[i]);
        strcat(dims_str,s);
      }
      sprintf(s, " or %d", exact_dimensions[n-1]);
      strcat(dims_str,s);
      PyErr_Format(PyExc_TypeError,
                   "Array must have %s dimensions.  Given array has %d dimensions",
                   dims_str,
                   array_numdims(ary));
    }
    return success;
  }

  /* Require the given PyArrayObject to have a specified shape.  If the
   * array has the specified shape, return 1.  Otherwise, set the python
   * error string and return 0.
   */
  int require_size(PyArrayObject* ary,
                   npy_intp*      size,
                   int            n)
  {
    int i;
    int success = 1;
    int len;
    char desired_dims[255] = "[";
    char s[255];
    char actual_dims[255] = "[";
    for(i=0; i < n;i++)
    {
      if (size[i] != -1 &&  size[i] != array_size(ary,i))
      {
        success = 0;
      }
    }
    if (!success)
    {
      for (i = 0; i < n; i++)
      {
        if (size[i] == -1)
        {
          sprintf(s, "*,");
        }
        else
        {
          sprintf(s, "%ld,", (long int)size[i]);
        }
        strcat(desired_dims,s);
      }
      len = strlen(desired_dims);
      desired_dims[len-1] = ']';
      for (i = 0; i < n; i++)
      {
        sprintf(s, "%ld,", (long int)array_size(ary,i));
        strcat(actual_dims,s);
      }
      len = strlen(actual_dims);
      actual_dims[len-1] = ']';
      PyErr_Format(PyExc_TypeError,
                   "Array must have shape of %s.  Given array has shape of %s",
                   desired_dims,
                   actual_dims);
    }
    return success;
  }

  /* Require the given PyArrayObject to to be Fortran ordered.  If the
   * the PyArrayObject is already Fortran ordered, do nothing.  Else,
   * set the Fortran ordering flag and recompute the strides.
   */
  int require_fortran(PyArrayObject* ary)
  {
    int success = 1;
    int nd = array_numdims(ary);
    int i;
    npy_intp * strides = array_strides(ary);
    if (array_is_fortran(ary)) return success;
    /* Set the Fortran ordered flag */
    array_enableflags(ary,NPY_ARRAY_FARRAY);
    /* Recompute the strides */
    strides[0] = strides[nd-1];
    for (i=1; i < nd; ++i)
      strides[i] = strides[i-1] * array_size(ary,i-1);
    return success;
  }




SWIGINTERN int
SWIG_AsVal_std_complex_Sl_double_Sg_  (PyObject *o, std::complex<double>* val)
{
  if (PyComplex_Check(o)) {
    if (val) *val = std::complex<double>(PyComplex_RealAsDouble(o), PyComplex_ImagAsDouble(o));
    return SWIG_OK;
  } else {
    double d;    
    int res = SWIG_AddCast(SWIG_AsVal_double (o, &d));
    if (SWIG_IsOK(res)) {
      if (val) *val = std::complex<double>(d, 0.0);
      return res;
    }
  }
  return SWIG_TypeError;
}


void _get_gradient(PyObject *grad, double scalegrad,
                    meep::dft_fields *fields_a_0, meep::dft_fields *fields_a_1, meep::dft_fields *fields_a_2,
                    meep::dft_fields *fields_f_0, meep::dft_fields *fields_f_1, meep::dft_fields *fields_f_2,
                   meep::grid_volume *grid_volume, meep::volume *where, PyObject *frequencies,
                   meep_geom::geom_epsilon *geps, double fd_step) {

    // clean the gradient array
    PyArrayObject *pao_grad = (PyArrayObject *)grad;
    if (!PyArray_Check(pao_grad)) meep::abort("grad parameter must be numpy array.");
    if (!PyArray_ISCARRAY(pao_grad)) meep::abort("Numpy grad array must be C-style contiguous.");
    if (PyArray_NDIM(pao_grad) !=2) {meep::abort("Numpy grad array must have 2 dimensions.");}
    double *grad_c = (double *)PyArray_DATA(pao_grad);
    npy_intp ng = PyArray_DIMS(pao_grad)[1]; // number of design parameters

    // clean the adjoint fields object
    std::vector<meep::dft_fields *> adjoint_fields = {fields_a_0,fields_a_1,fields_a_2};

    // clean the forward fields object
    std::vector<meep::dft_fields *> forward_fields = {fields_f_0,fields_f_1,fields_f_2};

    // clean the frequencies array
    PyArrayObject *pao_freqs = (PyArrayObject *)frequencies;
    if (!PyArray_Check(pao_freqs)) meep::abort("frequencies parameter must be numpy array.");
    if (!PyArray_ISCARRAY(pao_freqs)) meep::abort("Numpy fields array must be C-style contiguous.");
    double *frequencies_c = (double *)PyArray_DATA(pao_freqs);
    npy_intp nf = PyArray_DIMS(pao_freqs)[0];
    if (PyArray_DIMS(pao_grad)[0] != nf) meep::abort("Numpy grad array is allocated for %td frequencies; it should be allocated for %td.",PyArray_DIMS(pao_grad)[0],nf);

    // calculate the gradient
    meep_geom::material_grids_addgradient(grad_c,ng,nf,adjoint_fields,forward_fields,frequencies_c,scalegrad,*grid_volume,*where,geps,fd_step);

}


namespace swig {
  template <class Type>
  struct noconst_traits {
    typedef Type noconst_type;
  };

  template <class Type>
  struct noconst_traits<const Type> {
    typedef Type noconst_type;
  };

  /*
    type categories
  */
  struct pointer_category { };
  struct value_category { };

  /*
    General traits that provides type_name and type_info
  */
  template <class Type> struct traits { };

  template <class Type>
  inline const char* type_name() {
    return traits<typename noconst_traits<Type >::noconst_type >::type_name();
  }

  template <class Type> struct traits_info {
    static swig_type_info *type_query(std::string name) {
      name += " *";
      return SWIG_TypeQuery(name.c_str());
    }
    static swig_type_info *type_info() {
      static swig_type_info *info = type_query(type_name<Type>());
      return info;
    }
  };

  /*
    Partial specialization for pointers (traits_info)
  */
  template <class Type> struct traits_info<Type *> {
    static swig_type_info *type_query(std::string name) {
      name += " *";
      return SWIG_TypeQuery(name.c_str());
    }
    static swig_type_info *type_info() {
      static swig_type_info *info = type_query(type_name<Type>());
      return info;
    }
  };

  template <class Type>
  inline swig_type_info *type_info() {
    return traits_info<Type>::type_info();
  }

  /*
    Partial specialization for pointers (traits)
  */
  template <class Type> struct traits <Type *> {
    typedef pointer_category category;
    static std::string make_ptr_name(const char* name) {
      std::string ptrname = name;
      ptrname += " *";
      return ptrname;
    }
    static const char* type_name() {
      static std::string name = make_ptr_name(swig::type_name<Type>());
      return name.c_str();
    }
  };

  template <class Type, class Category>
  struct traits_as { };

  template <class Type, class Category>
  struct traits_check { };

}


namespace swig {  
  /*
    Traits that provides the from method
  */
  template <class Type> struct traits_from_ptr {
    static PyObject *from(Type *val, int owner = 0) {
      return SWIG_InternalNewPointerObj(val, type_info<Type>(), owner);
    }
  };

  template <class Type> struct traits_from {
    static PyObject *from(const Type& val) {
      return traits_from_ptr<Type>::from(new Type(val), 1);
    }
  };

  template <class Type> struct traits_from<Type *> {
    static PyObject *from(Type* val) {
      return traits_from_ptr<Type>::from(val, 0);
    }
  };

  template <class Type> struct traits_from<const Type *> {
    static PyObject *from(const Type* val) {
      return traits_from_ptr<Type>::from(const_cast<Type*>(val), 0);
    }
  };


  template <class Type>
  inline PyObject *from(const Type& val) {
    return traits_from<Type>::from(val);
  }

  template <class Type>
  inline PyObject *from_ptr(Type* val, int owner) {
    return traits_from_ptr<Type>::from(val, owner);
  }

  /*
    Traits that provides the asval/as/check method
  */
  template <class Type>
  struct traits_asptr {   
    static int asptr(PyObject *obj, Type **val) {
      int res = SWIG_ERROR;
      swig_type_info *descriptor = type_info<Type>();
      if (val) {
        Type *p = 0;
        int newmem = 0;
        res = descriptor ? SWIG_ConvertPtrAndOwn(obj, (void **)&p, descriptor, 0, &newmem) : SWIG_ERROR;
        if (SWIG_IsOK(res)) {
          if (newmem & SWIG_CAST_NEW_MEMORY) {
            res |= SWIG_NEWOBJMASK;
          }
          *val = p;
        }
      } else {
        res = descriptor ? SWIG_ConvertPtr(obj, 0, descriptor, 0) : SWIG_ERROR;
      }
      return res;
    }
  }; 

  template <class Type>
  inline int asptr(PyObject *obj, Type **vptr) {
    return traits_asptr<Type>::asptr(obj, vptr);
  }

  template <class Type> 
  struct traits_asval {
    static int asval(PyObject *obj, Type *val) {
      if (val) {
	Type *p = 0;
	int res = traits_asptr<Type>::asptr(obj, &p);
	if (!SWIG_IsOK(res)) return res;	
	if (p) {
	  typedef typename noconst_traits<Type>::noconst_type noconst_type;
	  *(const_cast<noconst_type*>(val)) = *p;
	  if (SWIG_IsNewObj(res)){
	    delete p;
	    res = SWIG_DelNewMask(res);
	  }
	  return res;
	} else {
	  return SWIG_ERROR;
	}
      } else {
	return traits_asptr<Type>::asptr(obj, (Type **)(0));
      }
    }
  };

  template <class Type> struct traits_asval<Type*> {
    static int asval(PyObject *obj, Type **val) {
      if (val) {
        typedef typename noconst_traits<Type>::noconst_type noconst_type;
        noconst_type *p = 0;
        int res = traits_asptr<noconst_type>::asptr(obj,  &p);
        if (SWIG_IsOK(res)) {
          *(const_cast<noconst_type**>(val)) = p;
	}
	return res;
      } else {
	return traits_asptr<Type>::asptr(obj, (Type **)(0));
      }
    }
  };
  
  template <class Type>
  inline int asval(PyObject *obj, Type *val) {
    return traits_asval<Type>::asval(obj, val);
  }

  template <class Type> 
  struct traits_as<Type, value_category> {
    static Type as(PyObject *obj) {
      Type v;
      int res = asval(obj, &v);
      if (!obj || !SWIG_IsOK(res)) {
	if (!PyErr_Occurred()) {
	  ::SWIG_Error(SWIG_TypeError,  swig::type_name<Type>());
	}
	throw std::invalid_argument("bad type");
      }
      return v;
    }
  };

  template <class Type> 
  struct traits_as<Type, pointer_category> {
    static Type as(PyObject *obj) {
      Type *v = 0;      
      int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR);
      if (SWIG_IsOK(res) && v) {
	if (SWIG_IsNewObj(res)) {
	  Type r(*v);
	  delete v;
	  return r;
	} else {
	  return *v;
	}
      } else {
	if (!PyErr_Occurred()) {
	  SWIG_Error(SWIG_TypeError,  swig::type_name<Type>());
	}
	throw std::invalid_argument("bad type");
      }
    }
  };

  template <class Type> 
  struct traits_as<Type*, pointer_category> {
    static Type* as(PyObject *obj) {
      Type *v = 0;      
      int res = (obj ? traits_asptr<Type>::asptr(obj, &v) : SWIG_ERROR);
      if (SWIG_IsOK(res)) {
	return v;
      } else {
	if (!PyErr_Occurred()) {
	  SWIG_Error(SWIG_TypeError,  swig::type_name<Type>());
	}
	throw std::invalid_argument("bad type");
      }
    }
  };
    
  template <class Type>
  inline Type as(PyObject *obj) {
    return traits_as<Type, typename traits<Type>::category>::as(obj);
  }

  template <class Type> 
  struct traits_check<Type, value_category> {
    static bool check(PyObject *obj) {
      int res = obj ? asval(obj, (Type *)(0)) : SWIG_ERROR;
      return SWIG_IsOK(res) ? true : false;
    }
  };

  template <class Type> 
  struct traits_check<Type, pointer_category> {
    static bool check(PyObject *obj) {
      int res = obj ? asptr(obj, (Type **)(0)) : SWIG_ERROR;
      return SWIG_IsOK(res) ? true : false;
    }
  };

  template <class Type>
  inline bool check(PyObject *obj) {
    return traits_check<Type, typename traits<Type>::category>::check(obj);
  }
}


#include <functional>

namespace std {
  template <>
  struct less <PyObject *>
  {
    bool
    operator()(PyObject * v, PyObject *w) const
    { 
      bool res;
      SWIG_PYTHON_THREAD_BEGIN_BLOCK;
      res = PyObject_RichCompareBool(v, w, Py_LT) ? true : false;
      /* This may fall into a case of inconsistent
               eg. ObjA > ObjX > ObjB
               but ObjA < ObjB
      */
      if( PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_TypeError) )
      {
        /* Objects can't be compared, this mostly occurred in Python 3.0 */
        /* Compare their ptr directly for a workaround */
        res = (v < w);
        PyErr_Clear();
      }
      SWIG_PYTHON_THREAD_END_BLOCK;
      return res;
    }
  };

  template <>
  struct less <swig::SwigPtr_PyObject>
  {
    bool
    operator()(const swig::SwigPtr_PyObject& v, const swig::SwigPtr_PyObject& w) const
    {
      return std::less<PyObject *>()(v, w);
    }
  };

  template <>
  struct less <swig::SwigVar_PyObject>
  {
    bool
    operator()(const swig::SwigVar_PyObject& v, const swig::SwigVar_PyObject& w) const
    {
      return std::less<PyObject *>()(v, w);
    }
  };

}

namespace swig {
  template <> struct traits<PyObject *> {
    typedef value_category category;
    static const char* type_name() { return "PyObject *"; }
  };  

  template <>  struct traits_asval<PyObject * > {   
    typedef PyObject * value_type;
    static int asval(PyObject *obj, value_type *val) {
      if (val) *val = obj;
      return SWIG_OK;
    }
  };

  template <> 
  struct traits_check<PyObject *, value_category> {
    static bool check(PyObject *) {
      return true;
    }
  };

  template <>  struct traits_from<PyObject *> {
    typedef PyObject * value_type;
    static PyObject *from(const value_type& val) {
      Py_XINCREF(val);
      return val;
    }
  };
  
}

namespace swig {
  template <class Difference>
  inline size_t
  check_index(Difference i, size_t size, bool insert = false) {
    if ( i < 0 ) {
      if ((size_t) (-i) <= size)
	return (size_t) (i + size);
    } else if ( (size_t) i < size ) {
      return (size_t) i;
    } else if (insert && ((size_t) i == size)) {
      return size;
    }
    throw std::out_of_range("index out of range");
  }

  template <class Difference>
  void
  slice_adjust(Difference i, Difference j, Py_ssize_t step, size_t size, Difference &ii, Difference &jj, bool insert = false) {
    if (step == 0) {
      throw std::invalid_argument("slice step cannot be zero");
    } else if (step > 0) {
      // Required range: 0 <= i < size, 0 <= j < size, i <= j
      if (i < 0) {
        ii = 0;
      } else if (i < (Difference)size) {
        ii = i;
      } else if (insert && (i >= (Difference)size)) {
        ii = (Difference)size;
      }
      if (j < 0) {
        jj = 0;
      } else {
        jj = (j < (Difference)size) ? j : (Difference)size;
      }
      if (jj < ii)
        jj = ii;
    } else {
      // Required range: -1 <= i < size-1, -1 <= j < size-1, i >= j
      if (i < -1) {
        ii = -1;
      } else if (i < (Difference) size) {
        ii = i;
      } else if (i >= (Difference)(size-1)) {
        ii = (Difference)(size-1);
      }
      if (j < -1) {
        jj = -1;
      } else {
        jj = (j < (Difference)size ) ? j : (Difference)(size-1);
      }
      if (ii < jj)
        ii = jj;
    }
  }

  template <class Sequence, class Difference>
  inline typename Sequence::iterator
  getpos(Sequence* self, Difference i)  {
    typename Sequence::iterator pos = self->begin();
    std::advance(pos, check_index(i,self->size()));
    return pos;
  }

  template <class Sequence, class Difference>
  inline typename Sequence::const_iterator
  cgetpos(const Sequence* self, Difference i)  {
    typename Sequence::const_iterator pos = self->begin();
    std::advance(pos, check_index(i,self->size()));
    return pos;
  }

  template <class Sequence>
  inline void
  erase(Sequence* seq, const typename Sequence::iterator& position) {
    seq->erase(position);
  }

  template <class Sequence>
  struct traits_reserve {
    static void reserve(Sequence & /*seq*/, typename Sequence::size_type /*n*/) {
      // This should be specialized for types that support reserve
    }
  };

  template <class Sequence, class Difference>
  inline Sequence*
  getslice(const Sequence* self, Difference i, Difference j, Py_ssize_t step) {
    typename Sequence::size_type size = self->size();
    Difference ii = 0;
    Difference jj = 0;
    swig::slice_adjust(i, j, step, size, ii, jj);

    if (step > 0) {
      typename Sequence::const_iterator sb = self->begin();
      typename Sequence::const_iterator se = self->begin();
      std::advance(sb,ii);
      std::advance(se,jj);
      if (step == 1) {
        return new Sequence(sb, se);
      } else {
        Sequence *sequence = new Sequence();
        swig::traits_reserve<Sequence>::reserve(*sequence, (jj - ii + step - 1) / step);
        typename Sequence::const_iterator it = sb;
        while (it!=se) {
          sequence->push_back(*it);
          for (Py_ssize_t c=0; c<step && it!=se; ++c)
            it++;
        }
        return sequence;
      } 
    } else {
      Sequence *sequence = new Sequence();
      swig::traits_reserve<Sequence>::reserve(*sequence, (ii - jj - step - 1) / -step);
      typename Sequence::const_reverse_iterator sb = self->rbegin();
      typename Sequence::const_reverse_iterator se = self->rbegin();
      std::advance(sb,size-ii-1);
      std::advance(se,size-jj-1);
      typename Sequence::const_reverse_iterator it = sb;
      while (it!=se) {
        sequence->push_back(*it);
        for (Py_ssize_t c=0; c<-step && it!=se; ++c)
          it++;
      }
      return sequence;
    }
  }

  template <class Sequence, class Difference, class InputSeq>
  inline void
  setslice(Sequence* self, Difference i, Difference j, Py_ssize_t step, const InputSeq& is = InputSeq()) {
    typename Sequence::size_type size = self->size();
    Difference ii = 0;
    Difference jj = 0;
    swig::slice_adjust(i, j, step, size, ii, jj, true);
    if (step > 0) {
      if (step == 1) {
        size_t ssize = jj - ii;
        if (ssize <= is.size()) {
          // expanding/staying the same size
          swig::traits_reserve<Sequence>::reserve(*self, self->size() - ssize + is.size());
          typename Sequence::iterator sb = self->begin();
          typename InputSeq::const_iterator isit = is.begin();
          std::advance(sb,ii);
          std::advance(isit, jj - ii);
          self->insert(std::copy(is.begin(), isit, sb), isit, is.end());
        } else {
          // shrinking
          typename Sequence::iterator sb = self->begin();
          typename Sequence::iterator se = self->begin();
          std::advance(sb,ii);
          std::advance(se,jj);
          self->erase(sb,se);
          sb = self->begin();
          std::advance(sb,ii);
          self->insert(sb, is.begin(), is.end());
        }
      } else {
        size_t replacecount = (jj - ii + step - 1) / step;
        if (is.size() != replacecount) {
          char msg[1024];
          sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount);
          throw std::invalid_argument(msg);
        }
        typename Sequence::const_iterator isit = is.begin();
        typename Sequence::iterator it = self->begin();
        std::advance(it,ii);
        for (size_t rc=0; rc<replacecount && it != self->end(); ++rc) {
          *it++ = *isit++;
          for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c)
            it++;
        }
      }
    } else {
      size_t replacecount = (ii - jj - step - 1) / -step;
      if (is.size() != replacecount) {
        char msg[1024];
        sprintf(msg, "attempt to assign sequence of size %lu to extended slice of size %lu", (unsigned long)is.size(), (unsigned long)replacecount);
        throw std::invalid_argument(msg);
      }
      typename Sequence::const_iterator isit = is.begin();
      typename Sequence::reverse_iterator it = self->rbegin();
      std::advance(it,size-ii-1);
      for (size_t rc=0; rc<replacecount && it != self->rend(); ++rc) {
        *it++ = *isit++;
        for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c)
          it++;
      }
    }
  }

  template <class Sequence, class Difference>
  inline void
  delslice(Sequence* self, Difference i, Difference j, Py_ssize_t step) {
    typename Sequence::size_type size = self->size();
    Difference ii = 0;
    Difference jj = 0;
    swig::slice_adjust(i, j, step, size, ii, jj, true);
    if (step > 0) {
      typename Sequence::iterator sb = self->begin();
      std::advance(sb,ii);
      if (step == 1) {
        typename Sequence::iterator se = self->begin();
        std::advance(se,jj);
        self->erase(sb,se);
      } else {
        typename Sequence::iterator it = sb;
        size_t delcount = (jj - ii + step - 1) / step;
        while (delcount) {
          it = self->erase(it);
          for (Py_ssize_t c=0; c<(step-1) && it != self->end(); ++c)
            it++;
          delcount--;
        }
      }
    } else {
      typename Sequence::reverse_iterator sb = self->rbegin();
      std::advance(sb,size-ii-1);
      typename Sequence::reverse_iterator it = sb;
      size_t delcount = (ii - jj - step - 1) / -step;
      while (delcount) {
        it = typename Sequence::reverse_iterator(self->erase((++it).base()));
        for (Py_ssize_t c=0; c<(-step-1) && it != self->rend(); ++c)
          it++;
        delcount--;
      }
    }
  }
}


#if defined(__SUNPRO_CC) && defined(_RWSTD_VER)
#  if !defined(SWIG_NO_STD_NOITERATOR_TRAITS_STL)
#    define SWIG_STD_NOITERATOR_TRAITS_STL
#  endif
#endif

#if !defined(SWIG_STD_NOITERATOR_TRAITS_STL)
#include <iterator>
#else
namespace std {
  template <class Iterator>
  struct iterator_traits {
    typedef ptrdiff_t difference_type;
    typedef typename Iterator::value_type value_type;
  };

  template <class Iterator, class Category,class T, class Reference, class Pointer, class Distance>
  struct iterator_traits<__reverse_bi_iterator<Iterator,Category,T,Reference,Pointer,Distance> > {
    typedef Distance difference_type;
    typedef T value_type;
  };

  template <class T>
  struct iterator_traits<T*> {
    typedef T value_type;
    typedef ptrdiff_t difference_type;
  };

  template<typename _InputIterator>
  inline typename iterator_traits<_InputIterator>::difference_type
  distance(_InputIterator __first, _InputIterator __last)
  {
    typename iterator_traits<_InputIterator>::difference_type __n = 0;
    while (__first != __last) {
      ++__first; ++__n;
    }
    return __n;
  }
}
#endif


namespace swig {
  template<typename OutIterator>
  class SwigPyIterator_T :  public SwigPyIterator
  {
  public:
    typedef OutIterator out_iterator;
    typedef typename std::iterator_traits<out_iterator>::value_type value_type;    
    typedef SwigPyIterator_T<out_iterator> self_type;

    SwigPyIterator_T(out_iterator curr, PyObject *seq)
      : SwigPyIterator(seq), current(curr)
    {
    }

    const out_iterator& get_current() const
    {
      return current;
    }

    
    bool equal (const SwigPyIterator &iter) const
    {
      const self_type *iters = dynamic_cast<const self_type *>(&iter);
      if (iters) {
	return (current == iters->get_current());
      } else {
	throw std::invalid_argument("bad iterator type");
      }
    }
    
    ptrdiff_t distance(const SwigPyIterator &iter) const
    {
      const self_type *iters = dynamic_cast<const self_type *>(&iter);
      if (iters) {
	return std::distance(current, iters->get_current());
      } else {
	throw std::invalid_argument("bad iterator type");
      }
    }    
    
  protected:
    out_iterator current;
  };
  
  template <class ValueType>
  struct from_oper 
  {
    typedef const ValueType& argument_type;
    typedef PyObject *result_type;
    result_type operator()(argument_type v) const
    {
      return swig::from(v);
    }
  };

  template<typename OutIterator, 
	   typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
	   typename FromOper = from_oper<ValueType> >
  class SwigPyForwardIteratorOpen_T :  public SwigPyIterator_T<OutIterator>
  {
  public:
    FromOper from;
    typedef OutIterator out_iterator;
    typedef ValueType value_type;
    typedef SwigPyIterator_T<out_iterator>  base;
    typedef SwigPyForwardIteratorOpen_T<OutIterator, ValueType, FromOper> self_type;
    
    SwigPyForwardIteratorOpen_T(out_iterator curr, PyObject *seq)
      : SwigPyIterator_T<OutIterator>(curr, seq)
    {
    }
    
    PyObject *value() const {
      return from(static_cast<const value_type&>(*(base::current)));
    }
    
    SwigPyIterator *copy() const
    {
      return new self_type(*this);
    }

    SwigPyIterator *incr(size_t n = 1)
    {
      while (n--) {
	++base::current;
      }
      return this;
    }

  };

  template<typename OutIterator, 
	   typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
	   typename FromOper = from_oper<ValueType> >
  class SwigPyIteratorOpen_T :  public SwigPyForwardIteratorOpen_T<OutIterator, ValueType, FromOper>
  {
  public:
    FromOper from;
    typedef OutIterator out_iterator;
    typedef ValueType value_type;
    typedef SwigPyIterator_T<out_iterator>  base;
    typedef SwigPyIteratorOpen_T<OutIterator, ValueType, FromOper> self_type;
    
    SwigPyIteratorOpen_T(out_iterator curr, PyObject *seq)
      : SwigPyForwardIteratorOpen_T<OutIterator>(curr, seq)
    {
    }

    SwigPyIterator *decr(size_t n = 1)
    {
      while (n--) {
	--base::current;
      }
      return this;
    }
  };

  template<typename OutIterator, 
	   typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
	   typename FromOper = from_oper<ValueType> >
  class SwigPyForwardIteratorClosed_T :  public SwigPyIterator_T<OutIterator>
  {
  public:
    FromOper from;
    typedef OutIterator out_iterator;
    typedef ValueType value_type;
    typedef SwigPyIterator_T<out_iterator>  base;    
    typedef SwigPyForwardIteratorClosed_T<OutIterator, ValueType, FromOper> self_type;
    
    SwigPyForwardIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq)
      : SwigPyIterator_T<OutIterator>(curr, seq), begin(first), end(last)
    {
    }
    
    PyObject *value() const {
      if (base::current == end) {
	throw stop_iteration();
      } else {
	return from(static_cast<const value_type&>(*(base::current)));
      }
    }
    
    SwigPyIterator *copy() const
    {
      return new self_type(*this);
    }

    SwigPyIterator *incr(size_t n = 1)
    {
      while (n--) {
	if (base::current == end) {
	  throw stop_iteration();
	} else {
	  ++base::current;
	}
      }
      return this;
    }

  protected:
    out_iterator begin;
    out_iterator end;
  };

  template<typename OutIterator, 
	   typename ValueType = typename std::iterator_traits<OutIterator>::value_type,
	   typename FromOper = from_oper<ValueType> >
  class SwigPyIteratorClosed_T :  public SwigPyForwardIteratorClosed_T<OutIterator,ValueType,FromOper>
  {
  public:
    FromOper from;
    typedef OutIterator out_iterator;
    typedef ValueType value_type;
    typedef SwigPyIterator_T<out_iterator>  base;
    typedef SwigPyForwardIteratorClosed_T<OutIterator, ValueType, FromOper> base0;
    typedef SwigPyIteratorClosed_T<OutIterator, ValueType, FromOper> self_type;
    
    SwigPyIteratorClosed_T(out_iterator curr, out_iterator first, out_iterator last, PyObject *seq)
      : SwigPyForwardIteratorClosed_T<OutIterator,ValueType,FromOper>(curr, first, last, seq)
    {
    }

    SwigPyIterator *decr(size_t n = 1)
    {
      while (n--) {
	if (base::current == base0::begin) {
	  throw stop_iteration();
	} else {
	  --base::current;
	}
      }
      return this;
    }
  };


  template<typename OutIter>
  inline SwigPyIterator*
  make_output_forward_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0)
  {
    return new SwigPyForwardIteratorClosed_T<OutIter>(current, begin, end, seq);
  }

  template<typename OutIter>
  inline SwigPyIterator*
  make_output_iterator(const OutIter& current, const OutIter& begin,const OutIter& end, PyObject *seq = 0)
  {
    return new SwigPyIteratorClosed_T<OutIter>(current, begin, end, seq);
  }

  template<typename OutIter>
  inline SwigPyIterator*
  make_output_forward_iterator(const OutIter& current, PyObject *seq = 0)
  {
    return new SwigPyForwardIteratorOpen_T<OutIter>(current, seq);
  }

  template<typename OutIter>
  inline SwigPyIterator*
  make_output_iterator(const OutIter& current, PyObject *seq = 0)
  {
    return new SwigPyIteratorOpen_T<OutIter>(current, seq);
  }

}


namespace swig
{
  template <class T>
  struct SwigPySequence_Ref
  {
    SwigPySequence_Ref(PyObject* seq, Py_ssize_t index)
      : _seq(seq), _index(index)
    {
    }
    
    operator T () const
    {
      swig::SwigVar_PyObject item = PySequence_GetItem(_seq, _index);
      try {
	return swig::as<T>(item);
      } catch (const std::invalid_argument& e) {
	char msg[1024];
	sprintf(msg, "in sequence element %d ", (int)_index);
	if (!PyErr_Occurred()) {
	  ::SWIG_Error(SWIG_TypeError,  swig::type_name<T>());
	}
	SWIG_Python_AddErrorMsg(msg);
	SWIG_Python_AddErrorMsg(e.what());
	throw;
      }
    }

    SwigPySequence_Ref& operator=(const T& v)
    {
      PySequence_SetItem(_seq, _index, swig::from<T>(v));
      return *this;
    }

  private:
    PyObject* _seq;
    Py_ssize_t _index;
  };

  template <class T>
  struct SwigPySequence_ArrowProxy
  {
    SwigPySequence_ArrowProxy(const T& x): m_value(x) {}
    const T* operator->() const { return &m_value; }
    operator const T*() const { return &m_value; }
    T m_value;
  };

  template <class T, class Reference >
  struct SwigPySequence_InputIterator
  {
    typedef SwigPySequence_InputIterator<T, Reference > self;

    typedef std::random_access_iterator_tag iterator_category;
    typedef Reference reference;
    typedef T value_type;
    typedef T* pointer;
    typedef Py_ssize_t difference_type;

    SwigPySequence_InputIterator()
    {
    }

    SwigPySequence_InputIterator(PyObject* seq, Py_ssize_t index)
      : _seq(seq), _index(index)
    {
    }

    reference operator*() const
    {
      return reference(_seq, _index);
    }

    SwigPySequence_ArrowProxy<T>
    operator->() const {
      return SwigPySequence_ArrowProxy<T>(operator*());
    }

    bool operator==(const self& ri) const
    {
      return (_index == ri._index) && (_seq == ri._seq);
    }

    bool operator!=(const self& ri) const
    {
      return !(operator==(ri));
    }

    self& operator ++ ()
    {
      ++_index;
      return *this;
    }

    self& operator -- ()
    {
      --_index;
      return *this;
    }

    self& operator += (difference_type n)
    {
      _index += n;
      return *this;
    }

    self operator +(difference_type n) const
    {
      return self(_seq, _index + n);
    }

    self& operator -= (difference_type n)
    {
      _index -= n;
      return *this;
    }

    self operator -(difference_type n) const
    {
      return self(_seq, _index - n);
    }

    difference_type operator - (const self& ri) const
    {
      return _index - ri._index;
    }

    bool operator < (const self& ri) const
    {
      return _index < ri._index;
    }

    reference
    operator[](difference_type n) const
    {
      return reference(_seq, _index + n);
    }

  private:
    PyObject* _seq;
    difference_type _index;
  };

  // STL container wrapper around a Python sequence
  template <class T>
  struct SwigPySequence_Cont
  {
    typedef SwigPySequence_Ref<T> reference;
    typedef const SwigPySequence_Ref<T> const_reference;
    typedef T value_type;
    typedef T* pointer;
    typedef Py_ssize_t difference_type;
    typedef size_t size_type;
    typedef const pointer const_pointer;
    typedef SwigPySequence_InputIterator<T, reference> iterator;
    typedef SwigPySequence_InputIterator<T, const_reference> const_iterator;

    SwigPySequence_Cont(PyObject* seq) : _seq(0)
    {
      if (!PySequence_Check(seq)) {
	throw std::invalid_argument("a sequence is expected");
      }
      _seq = seq;
      Py_INCREF(_seq);
    }

    ~SwigPySequence_Cont()
    {
      Py_XDECREF(_seq);
    }

    size_type size() const
    {
      return static_cast<size_type>(PySequence_Size(_seq));
    }

    bool empty() const
    {
      return size() == 0;
    }

    iterator begin()
    {
      return iterator(_seq, 0);
    }

    const_iterator begin() const
    {
      return const_iterator(_seq, 0);
    }

    iterator end()
    {
      return iterator(_seq, size());
    }

    const_iterator end() const
    {
      return const_iterator(_seq, size());
    }

    reference operator[](difference_type n)
    {
      return reference(_seq, n);
    }

    const_reference operator[](difference_type n)  const
    {
      return const_reference(_seq, n);
    }

    bool check() const
    {
      Py_ssize_t s = size();
      for (Py_ssize_t i = 0; i < s; ++i) {
	swig::SwigVar_PyObject item = PySequence_GetItem(_seq, i);
	if (!swig::check<value_type>(item))
	  return false;
      }
      return true;
    }

  private:
    PyObject* _seq;
  };

}


  namespace swig {
    template <>  struct traits< meep_geom::fragment_stats > {
      typedef pointer_category category;
      static const char* type_name() { return"meep_geom::fragment_stats"; }
    };
  }


namespace swig {
  template <class SwigPySeq, class Seq>
  inline void
  assign(const SwigPySeq& swigpyseq, Seq* seq) {
    // seq->assign(swigpyseq.begin(), swigpyseq.end()); // not used as not always implemented
    typedef typename SwigPySeq::value_type value_type;
    typename SwigPySeq::const_iterator it = swigpyseq.begin();
    for (;it != swigpyseq.end(); ++it) {
      seq->insert(seq->end(),(value_type)(*it));
    }
  }

  template <class Seq, class T = typename Seq::value_type >
  struct traits_asptr_stdseq {
    typedef Seq sequence;
    typedef T value_type;

    static int asptr(PyObject *obj, sequence **seq) {
      if (obj == Py_None || SWIG_Python_GetSwigThis(obj)) {
	sequence *p;
	swig_type_info *descriptor = swig::type_info<sequence>();
	if (descriptor && SWIG_IsOK(::SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0))) {
	  if (seq) *seq = p;
	  return SWIG_OLDOBJ;
	}
      } else if (PySequence_Check(obj)) {
	try {
	  SwigPySequence_Cont<value_type> swigpyseq(obj);
	  if (seq) {
	    sequence *pseq = new sequence();
	    assign(swigpyseq, pseq);
	    *seq = pseq;
	    return SWIG_NEWOBJ;
	  } else {
	    return swigpyseq.check() ? SWIG_OK : SWIG_ERROR;
	  }
	} catch (std::exception& e) {
	  if (seq) {
	    if (!PyErr_Occurred()) {
	      PyErr_SetString(PyExc_TypeError, e.what());
	    }
	  }
	  return SWIG_ERROR;
	}
      }
      return SWIG_ERROR;
    }
  };

  template <class Seq, class T = typename Seq::value_type >
  struct traits_from_stdseq {
    typedef Seq sequence;
    typedef T value_type;
    typedef typename Seq::size_type size_type;
    typedef typename sequence::const_iterator const_iterator;

    static PyObject *from(const sequence& seq) {
#ifdef SWIG_PYTHON_EXTRA_NATIVE_CONTAINERS
      swig_type_info *desc = swig::type_info<sequence>();
      if (desc && desc->clientdata) {
	return SWIG_InternalNewPointerObj(new sequence(seq), desc, SWIG_POINTER_OWN);
      }
#endif
      size_type size = seq.size();
      if (size <= (size_type)INT_MAX) {
	PyObject *obj = PyTuple_New((Py_ssize_t)size);
	Py_ssize_t i = 0;
	for (const_iterator it = seq.begin(); it != seq.end(); ++it, ++i) {
	  PyTuple_SetItem(obj,i,swig::from<value_type>(*it));
	}
	return obj;
      } else {
	PyErr_SetString(PyExc_OverflowError,"sequence size not valid in python");
	return NULL;
      }
    }
  };
}


  namespace swig {
    template <class T>
    struct traits_reserve<std::vector<T> > {
      static void reserve(std::vector<T> &seq, typename std::vector<T>::size_type n) {
        seq.reserve(n);
      }
    };

    template <class T>
    struct traits_asptr<std::vector<T> >  {
      static int asptr(PyObject *obj, std::vector<T> **vec) {
	return traits_asptr_stdseq<std::vector<T> >::asptr(obj, vec);
      }
    };
    
    template <class T>
    struct traits_from<std::vector<T> > {
      static PyObject *from(const std::vector<T>& vec) {
	return traits_from_stdseq<std::vector<T> >::from(vec);
      }
    };
  }


      namespace swig {
	template <>  struct traits<std::vector< meep_geom::fragment_stats, std::allocator< meep_geom::fragment_stats > > > {
	  typedef pointer_category category;
	  static const char* type_name() {
	    return "std::vector<" "meep_geom::fragment_stats" "," "std::allocator< meep_geom::fragment_stats >" " >";
	  }
	};
      }
    
SWIGINTERN swig::SwigPyIterator *std_vector_Sl_meep_geom_fragment_stats_Sg__iterator(std::vector< meep_geom::fragment_stats > *self,PyObject **PYTHON_SELF){
      return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
    }
SWIGINTERN bool std_vector_Sl_meep_geom_fragment_stats_Sg____nonzero__(std::vector< meep_geom::fragment_stats > const *self){
      return !(self->empty());
    }
SWIGINTERN bool std_vector_Sl_meep_geom_fragment_stats_Sg____bool__(std::vector< meep_geom::fragment_stats > const *self){
      return !(self->empty());
    }
SWIGINTERN std::vector< meep_geom::fragment_stats >::size_type std_vector_Sl_meep_geom_fragment_stats_Sg____len__(std::vector< meep_geom::fragment_stats > const *self){
      return self->size();
    }
SWIGINTERN std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > > *std_vector_Sl_meep_geom_fragment_stats_Sg____getslice__(std::vector< meep_geom::fragment_stats > *self,std::vector< meep_geom::fragment_stats >::difference_type i,std::vector< meep_geom::fragment_stats >::difference_type j){
      return swig::getslice(self, i, j, 1);
    }
SWIGINTERN void std_vector_Sl_meep_geom_fragment_stats_Sg____setslice____SWIG_0(std::vector< meep_geom::fragment_stats > *self,std::vector< meep_geom::fragment_stats >::difference_type i,std::vector< meep_geom::fragment_stats >::difference_type j){
      swig::setslice(self, i, j, 1, std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >());
    }
SWIGINTERN void std_vector_Sl_meep_geom_fragment_stats_Sg____setslice____SWIG_1(std::vector< meep_geom::fragment_stats > *self,std::vector< meep_geom::fragment_stats >::difference_type i,std::vector< meep_geom::fragment_stats >::difference_type j,std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > > const &v){
      swig::setslice(self, i, j, 1, v);
    }
SWIGINTERN void std_vector_Sl_meep_geom_fragment_stats_Sg____delslice__(std::vector< meep_geom::fragment_stats > *self,std::vector< meep_geom::fragment_stats >::difference_type i,std::vector< meep_geom::fragment_stats >::difference_type j){
      swig::delslice(self, i, j, 1);
    }
SWIGINTERN void std_vector_Sl_meep_geom_fragment_stats_Sg____delitem____SWIG_0(std::vector< meep_geom::fragment_stats > *self,std::vector< meep_geom::fragment_stats >::difference_type i){
      swig::erase(self, swig::getpos(self, i));
    }
SWIGINTERN std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > > *std_vector_Sl_meep_geom_fragment_stats_Sg____getitem____SWIG_0(std::vector< meep_geom::fragment_stats > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return NULL;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >::difference_type id = i;
      std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >::difference_type jd = j;
      return swig::getslice(self, id, jd, step);
    }
SWIGINTERN void std_vector_Sl_meep_geom_fragment_stats_Sg____setitem____SWIG_0(std::vector< meep_geom::fragment_stats > *self,PySliceObject *slice,std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > > const &v){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >::difference_type id = i;
      std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >::difference_type jd = j;
      swig::setslice(self, id, jd, step, v);
    }
SWIGINTERN void std_vector_Sl_meep_geom_fragment_stats_Sg____setitem____SWIG_1(std::vector< meep_geom::fragment_stats > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >::difference_type id = i;
      std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >::difference_type jd = j;
      swig::delslice(self, id, jd, step);
    }
SWIGINTERN void std_vector_Sl_meep_geom_fragment_stats_Sg____delitem____SWIG_1(std::vector< meep_geom::fragment_stats > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >::difference_type id = i;
      std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >::difference_type jd = j;
      swig::delslice(self, id, jd, step);
    }
SWIGINTERN std::vector< meep_geom::fragment_stats >::value_type const &std_vector_Sl_meep_geom_fragment_stats_Sg____getitem____SWIG_1(std::vector< meep_geom::fragment_stats > const *self,std::vector< meep_geom::fragment_stats >::difference_type i){
      return *(swig::cgetpos(self, i));
    }

namespace swig {
  static PyObject* container_owner_attribute() {
    static PyObject* attr = SWIG_Python_str_FromChar("__swig_container");
    return attr;
  }

  template <typename T>
  struct container_owner {
    // By default, do not add the back-reference (for value types)
    // Specialization below will check the reference for pointer types.
    static bool back_reference(PyObject* /*child*/, PyObject* /*owner*/) {
      return false;
    }
  };

  template <>
  struct container_owner<swig::pointer_category> {  
    /*
     * Call to add a back-reference to the owning object when returning a 
     * reference from a container.  Will only set the reference if child
     * is a SWIG wrapper object that does not own the pointer.
     *
     * returns whether the reference was set or not
     */
    static bool back_reference(PyObject* child, PyObject* owner) {
      SwigPyObject* swigThis = SWIG_Python_GetSwigThis(child);
      if (swigThis && (swigThis->own & SWIG_POINTER_OWN) != SWIG_POINTER_OWN) {
        return PyObject_SetAttr(child, container_owner_attribute(), owner) != -1;
      }
      return false;
    }
  };
}

SWIGINTERN void std_vector_Sl_meep_geom_fragment_stats_Sg____setitem____SWIG_2(std::vector< meep_geom::fragment_stats > *self,std::vector< meep_geom::fragment_stats >::difference_type i,std::vector< meep_geom::fragment_stats >::value_type const &x){
      *(swig::getpos(self,i)) = x;
    }
SWIGINTERN std::vector< meep_geom::fragment_stats >::value_type std_vector_Sl_meep_geom_fragment_stats_Sg__pop(std::vector< meep_geom::fragment_stats > *self){
      if (self->size() == 0)
	throw std::out_of_range("pop from empty container");
      std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >::value_type x = self->back();
      self->pop_back();
      return x;
    }
SWIGINTERN void std_vector_Sl_meep_geom_fragment_stats_Sg__append(std::vector< meep_geom::fragment_stats > *self,std::vector< meep_geom::fragment_stats >::value_type const &x){
      self->push_back(x);
    }
SWIGINTERN std::vector< meep_geom::fragment_stats >::iterator std_vector_Sl_meep_geom_fragment_stats_Sg__erase__SWIG_0(std::vector< meep_geom::fragment_stats > *self,std::vector< meep_geom::fragment_stats >::iterator pos){ return self->erase(pos); }
SWIGINTERN std::vector< meep_geom::fragment_stats >::iterator std_vector_Sl_meep_geom_fragment_stats_Sg__erase__SWIG_1(std::vector< meep_geom::fragment_stats > *self,std::vector< meep_geom::fragment_stats >::iterator first,std::vector< meep_geom::fragment_stats >::iterator last){ return self->erase(first, last); }
SWIGINTERN std::vector< meep_geom::fragment_stats >::iterator std_vector_Sl_meep_geom_fragment_stats_Sg__insert__SWIG_0(std::vector< meep_geom::fragment_stats > *self,std::vector< meep_geom::fragment_stats >::iterator pos,std::vector< meep_geom::fragment_stats >::value_type const &x){ return self->insert(pos, x); }
SWIGINTERN void std_vector_Sl_meep_geom_fragment_stats_Sg__insert__SWIG_1(std::vector< meep_geom::fragment_stats > *self,std::vector< meep_geom::fragment_stats >::iterator pos,std::vector< meep_geom::fragment_stats >::size_type n,std::vector< meep_geom::fragment_stats >::value_type const &x){ self->insert(pos, n, x); }

  namespace swig {
    template <>  struct traits< meep_geom::dft_data > {
      typedef pointer_category category;
      static const char* type_name() { return"meep_geom::dft_data"; }
    };
  }


      namespace swig {
	template <>  struct traits<std::vector< meep_geom::dft_data, std::allocator< meep_geom::dft_data > > > {
	  typedef pointer_category category;
	  static const char* type_name() {
	    return "std::vector<" "meep_geom::dft_data" "," "std::allocator< meep_geom::dft_data >" " >";
	  }
	};
      }
    
SWIGINTERN swig::SwigPyIterator *std_vector_Sl_meep_geom_dft_data_Sg__iterator(std::vector< meep_geom::dft_data > *self,PyObject **PYTHON_SELF){
      return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
    }
SWIGINTERN bool std_vector_Sl_meep_geom_dft_data_Sg____nonzero__(std::vector< meep_geom::dft_data > const *self){
      return !(self->empty());
    }
SWIGINTERN bool std_vector_Sl_meep_geom_dft_data_Sg____bool__(std::vector< meep_geom::dft_data > const *self){
      return !(self->empty());
    }
SWIGINTERN std::vector< meep_geom::dft_data >::size_type std_vector_Sl_meep_geom_dft_data_Sg____len__(std::vector< meep_geom::dft_data > const *self){
      return self->size();
    }
SWIGINTERN std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > *std_vector_Sl_meep_geom_dft_data_Sg____getslice__(std::vector< meep_geom::dft_data > *self,std::vector< meep_geom::dft_data >::difference_type i,std::vector< meep_geom::dft_data >::difference_type j){
      return swig::getslice(self, i, j, 1);
    }
SWIGINTERN void std_vector_Sl_meep_geom_dft_data_Sg____setslice____SWIG_0(std::vector< meep_geom::dft_data > *self,std::vector< meep_geom::dft_data >::difference_type i,std::vector< meep_geom::dft_data >::difference_type j){
      swig::setslice(self, i, j, 1, std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >());
    }
SWIGINTERN void std_vector_Sl_meep_geom_dft_data_Sg____setslice____SWIG_1(std::vector< meep_geom::dft_data > *self,std::vector< meep_geom::dft_data >::difference_type i,std::vector< meep_geom::dft_data >::difference_type j,std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > const &v){
      swig::setslice(self, i, j, 1, v);
    }
SWIGINTERN void std_vector_Sl_meep_geom_dft_data_Sg____delslice__(std::vector< meep_geom::dft_data > *self,std::vector< meep_geom::dft_data >::difference_type i,std::vector< meep_geom::dft_data >::difference_type j){
      swig::delslice(self, i, j, 1);
    }
SWIGINTERN void std_vector_Sl_meep_geom_dft_data_Sg____delitem____SWIG_0(std::vector< meep_geom::dft_data > *self,std::vector< meep_geom::dft_data >::difference_type i){
      swig::erase(self, swig::getpos(self, i));
    }
SWIGINTERN std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > *std_vector_Sl_meep_geom_dft_data_Sg____getitem____SWIG_0(std::vector< meep_geom::dft_data > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return NULL;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >::difference_type id = i;
      std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >::difference_type jd = j;
      return swig::getslice(self, id, jd, step);
    }
SWIGINTERN void std_vector_Sl_meep_geom_dft_data_Sg____setitem____SWIG_0(std::vector< meep_geom::dft_data > *self,PySliceObject *slice,std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > const &v){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >::difference_type id = i;
      std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >::difference_type jd = j;
      swig::setslice(self, id, jd, step, v);
    }
SWIGINTERN void std_vector_Sl_meep_geom_dft_data_Sg____setitem____SWIG_1(std::vector< meep_geom::dft_data > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >::difference_type id = i;
      std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >::difference_type jd = j;
      swig::delslice(self, id, jd, step);
    }
SWIGINTERN void std_vector_Sl_meep_geom_dft_data_Sg____delitem____SWIG_1(std::vector< meep_geom::dft_data > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >::difference_type id = i;
      std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >::difference_type jd = j;
      swig::delslice(self, id, jd, step);
    }
SWIGINTERN std::vector< meep_geom::dft_data >::value_type const &std_vector_Sl_meep_geom_dft_data_Sg____getitem____SWIG_1(std::vector< meep_geom::dft_data > const *self,std::vector< meep_geom::dft_data >::difference_type i){
      return *(swig::cgetpos(self, i));
    }
SWIGINTERN void std_vector_Sl_meep_geom_dft_data_Sg____setitem____SWIG_2(std::vector< meep_geom::dft_data > *self,std::vector< meep_geom::dft_data >::difference_type i,std::vector< meep_geom::dft_data >::value_type const &x){
      *(swig::getpos(self,i)) = x;
    }
SWIGINTERN std::vector< meep_geom::dft_data >::value_type std_vector_Sl_meep_geom_dft_data_Sg__pop(std::vector< meep_geom::dft_data > *self){
      if (self->size() == 0)
	throw std::out_of_range("pop from empty container");
      std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >::value_type x = self->back();
      self->pop_back();
      return x;
    }
SWIGINTERN void std_vector_Sl_meep_geom_dft_data_Sg__append(std::vector< meep_geom::dft_data > *self,std::vector< meep_geom::dft_data >::value_type const &x){
      self->push_back(x);
    }
SWIGINTERN std::vector< meep_geom::dft_data >::iterator std_vector_Sl_meep_geom_dft_data_Sg__erase__SWIG_0(std::vector< meep_geom::dft_data > *self,std::vector< meep_geom::dft_data >::iterator pos){ return self->erase(pos); }
SWIGINTERN std::vector< meep_geom::dft_data >::iterator std_vector_Sl_meep_geom_dft_data_Sg__erase__SWIG_1(std::vector< meep_geom::dft_data > *self,std::vector< meep_geom::dft_data >::iterator first,std::vector< meep_geom::dft_data >::iterator last){ return self->erase(first, last); }
SWIGINTERN std::vector< meep_geom::dft_data >::iterator std_vector_Sl_meep_geom_dft_data_Sg__insert__SWIG_0(std::vector< meep_geom::dft_data > *self,std::vector< meep_geom::dft_data >::iterator pos,std::vector< meep_geom::dft_data >::value_type const &x){ return self->insert(pos, x); }
SWIGINTERN void std_vector_Sl_meep_geom_dft_data_Sg__insert__SWIG_1(std::vector< meep_geom::dft_data > *self,std::vector< meep_geom::dft_data >::iterator pos,std::vector< meep_geom::dft_data >::size_type n,std::vector< meep_geom::dft_data >::value_type const &x){ self->insert(pos, n, x); }

  namespace swig {
    template <>  struct traits< meep::volume > {
      typedef pointer_category category;
      static const char* type_name() { return"meep::volume"; }
    };
  }


      namespace swig {
	template <>  struct traits<std::vector< meep::volume, std::allocator< meep::volume > > > {
	  typedef pointer_category category;
	  static const char* type_name() {
	    return "std::vector<" "meep::volume" "," "std::allocator< meep::volume >" " >";
	  }
	};
      }
    
SWIGINTERN swig::SwigPyIterator *std_vector_Sl_meep_volume_Sg__iterator(std::vector< meep::volume > *self,PyObject **PYTHON_SELF){
      return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
    }
SWIGINTERN bool std_vector_Sl_meep_volume_Sg____nonzero__(std::vector< meep::volume > const *self){
      return !(self->empty());
    }
SWIGINTERN bool std_vector_Sl_meep_volume_Sg____bool__(std::vector< meep::volume > const *self){
      return !(self->empty());
    }
SWIGINTERN std::vector< meep::volume >::size_type std_vector_Sl_meep_volume_Sg____len__(std::vector< meep::volume > const *self){
      return self->size();
    }
SWIGINTERN std::vector< meep::volume,std::allocator< meep::volume > > *std_vector_Sl_meep_volume_Sg____getslice__(std::vector< meep::volume > *self,std::vector< meep::volume >::difference_type i,std::vector< meep::volume >::difference_type j){
      return swig::getslice(self, i, j, 1);
    }
SWIGINTERN void std_vector_Sl_meep_volume_Sg____setslice____SWIG_0(std::vector< meep::volume > *self,std::vector< meep::volume >::difference_type i,std::vector< meep::volume >::difference_type j){
      swig::setslice(self, i, j, 1, std::vector< meep::volume,std::allocator< meep::volume > >());
    }
SWIGINTERN void std_vector_Sl_meep_volume_Sg____setslice____SWIG_1(std::vector< meep::volume > *self,std::vector< meep::volume >::difference_type i,std::vector< meep::volume >::difference_type j,std::vector< meep::volume,std::allocator< meep::volume > > const &v){
      swig::setslice(self, i, j, 1, v);
    }
SWIGINTERN void std_vector_Sl_meep_volume_Sg____delslice__(std::vector< meep::volume > *self,std::vector< meep::volume >::difference_type i,std::vector< meep::volume >::difference_type j){
      swig::delslice(self, i, j, 1);
    }
SWIGINTERN void std_vector_Sl_meep_volume_Sg____delitem____SWIG_0(std::vector< meep::volume > *self,std::vector< meep::volume >::difference_type i){
      swig::erase(self, swig::getpos(self, i));
    }
SWIGINTERN std::vector< meep::volume,std::allocator< meep::volume > > *std_vector_Sl_meep_volume_Sg____getitem____SWIG_0(std::vector< meep::volume > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return NULL;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< meep::volume,std::allocator< meep::volume > >::difference_type id = i;
      std::vector< meep::volume,std::allocator< meep::volume > >::difference_type jd = j;
      return swig::getslice(self, id, jd, step);
    }
SWIGINTERN void std_vector_Sl_meep_volume_Sg____setitem____SWIG_0(std::vector< meep::volume > *self,PySliceObject *slice,std::vector< meep::volume,std::allocator< meep::volume > > const &v){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< meep::volume,std::allocator< meep::volume > >::difference_type id = i;
      std::vector< meep::volume,std::allocator< meep::volume > >::difference_type jd = j;
      swig::setslice(self, id, jd, step, v);
    }
SWIGINTERN void std_vector_Sl_meep_volume_Sg____setitem____SWIG_1(std::vector< meep::volume > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< meep::volume,std::allocator< meep::volume > >::difference_type id = i;
      std::vector< meep::volume,std::allocator< meep::volume > >::difference_type jd = j;
      swig::delslice(self, id, jd, step);
    }
SWIGINTERN void std_vector_Sl_meep_volume_Sg____delitem____SWIG_1(std::vector< meep::volume > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< meep::volume,std::allocator< meep::volume > >::difference_type id = i;
      std::vector< meep::volume,std::allocator< meep::volume > >::difference_type jd = j;
      swig::delslice(self, id, jd, step);
    }
SWIGINTERN std::vector< meep::volume >::value_type const &std_vector_Sl_meep_volume_Sg____getitem____SWIG_1(std::vector< meep::volume > const *self,std::vector< meep::volume >::difference_type i){
      return *(swig::cgetpos(self, i));
    }
SWIGINTERN void std_vector_Sl_meep_volume_Sg____setitem____SWIG_2(std::vector< meep::volume > *self,std::vector< meep::volume >::difference_type i,std::vector< meep::volume >::value_type const &x){
      *(swig::getpos(self,i)) = x;
    }
SWIGINTERN std::vector< meep::volume >::value_type std_vector_Sl_meep_volume_Sg__pop(std::vector< meep::volume > *self){
      if (self->size() == 0)
	throw std::out_of_range("pop from empty container");
      std::vector< meep::volume,std::allocator< meep::volume > >::value_type x = self->back();
      self->pop_back();
      return x;
    }
SWIGINTERN void std_vector_Sl_meep_volume_Sg__append(std::vector< meep::volume > *self,std::vector< meep::volume >::value_type const &x){
      self->push_back(x);
    }
SWIGINTERN std::vector< meep::volume >::iterator std_vector_Sl_meep_volume_Sg__erase__SWIG_0(std::vector< meep::volume > *self,std::vector< meep::volume >::iterator pos){ return self->erase(pos); }
SWIGINTERN std::vector< meep::volume >::iterator std_vector_Sl_meep_volume_Sg__erase__SWIG_1(std::vector< meep::volume > *self,std::vector< meep::volume >::iterator first,std::vector< meep::volume >::iterator last){ return self->erase(first, last); }
SWIGINTERN std::vector< meep::volume >::iterator std_vector_Sl_meep_volume_Sg__insert__SWIG_0(std::vector< meep::volume > *self,std::vector< meep::volume >::iterator pos,std::vector< meep::volume >::value_type const &x){ return self->insert(pos, x); }
SWIGINTERN void std_vector_Sl_meep_volume_Sg__insert__SWIG_1(std::vector< meep::volume > *self,std::vector< meep::volume >::iterator pos,std::vector< meep::volume >::size_type n,std::vector< meep::volume >::value_type const &x){ self->insert(pos, n, x); }

  namespace swig {
    template <>  struct traits< meep::grid_volume > {
      typedef pointer_category category;
      static const char* type_name() { return"meep::grid_volume"; }
    };
  }


      namespace swig {
	template <>  struct traits<std::vector< meep::grid_volume, std::allocator< meep::grid_volume > > > {
	  typedef pointer_category category;
	  static const char* type_name() {
	    return "std::vector<" "meep::grid_volume" "," "std::allocator< meep::grid_volume >" " >";
	  }
	};
      }
    
SWIGINTERN swig::SwigPyIterator *std_vector_Sl_meep_grid_volume_Sg__iterator(std::vector< meep::grid_volume > *self,PyObject **PYTHON_SELF){
      return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
    }
SWIGINTERN bool std_vector_Sl_meep_grid_volume_Sg____nonzero__(std::vector< meep::grid_volume > const *self){
      return !(self->empty());
    }
SWIGINTERN bool std_vector_Sl_meep_grid_volume_Sg____bool__(std::vector< meep::grid_volume > const *self){
      return !(self->empty());
    }
SWIGINTERN std::vector< meep::grid_volume >::size_type std_vector_Sl_meep_grid_volume_Sg____len__(std::vector< meep::grid_volume > const *self){
      return self->size();
    }
SWIGINTERN std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > *std_vector_Sl_meep_grid_volume_Sg____getslice__(std::vector< meep::grid_volume > *self,std::vector< meep::grid_volume >::difference_type i,std::vector< meep::grid_volume >::difference_type j){
      return swig::getslice(self, i, j, 1);
    }
SWIGINTERN void std_vector_Sl_meep_grid_volume_Sg____setslice____SWIG_0(std::vector< meep::grid_volume > *self,std::vector< meep::grid_volume >::difference_type i,std::vector< meep::grid_volume >::difference_type j){
      swig::setslice(self, i, j, 1, std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >());
    }
SWIGINTERN void std_vector_Sl_meep_grid_volume_Sg____setslice____SWIG_1(std::vector< meep::grid_volume > *self,std::vector< meep::grid_volume >::difference_type i,std::vector< meep::grid_volume >::difference_type j,std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > const &v){
      swig::setslice(self, i, j, 1, v);
    }
SWIGINTERN void std_vector_Sl_meep_grid_volume_Sg____delslice__(std::vector< meep::grid_volume > *self,std::vector< meep::grid_volume >::difference_type i,std::vector< meep::grid_volume >::difference_type j){
      swig::delslice(self, i, j, 1);
    }
SWIGINTERN void std_vector_Sl_meep_grid_volume_Sg____delitem____SWIG_0(std::vector< meep::grid_volume > *self,std::vector< meep::grid_volume >::difference_type i){
      swig::erase(self, swig::getpos(self, i));
    }
SWIGINTERN std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > *std_vector_Sl_meep_grid_volume_Sg____getitem____SWIG_0(std::vector< meep::grid_volume > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return NULL;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >::difference_type id = i;
      std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >::difference_type jd = j;
      return swig::getslice(self, id, jd, step);
    }
SWIGINTERN void std_vector_Sl_meep_grid_volume_Sg____setitem____SWIG_0(std::vector< meep::grid_volume > *self,PySliceObject *slice,std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > const &v){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >::difference_type id = i;
      std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >::difference_type jd = j;
      swig::setslice(self, id, jd, step, v);
    }
SWIGINTERN void std_vector_Sl_meep_grid_volume_Sg____setitem____SWIG_1(std::vector< meep::grid_volume > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >::difference_type id = i;
      std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >::difference_type jd = j;
      swig::delslice(self, id, jd, step);
    }
SWIGINTERN void std_vector_Sl_meep_grid_volume_Sg____delitem____SWIG_1(std::vector< meep::grid_volume > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >::difference_type id = i;
      std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >::difference_type jd = j;
      swig::delslice(self, id, jd, step);
    }
SWIGINTERN std::vector< meep::grid_volume >::value_type const &std_vector_Sl_meep_grid_volume_Sg____getitem____SWIG_1(std::vector< meep::grid_volume > const *self,std::vector< meep::grid_volume >::difference_type i){
      return *(swig::cgetpos(self, i));
    }
SWIGINTERN void std_vector_Sl_meep_grid_volume_Sg____setitem____SWIG_2(std::vector< meep::grid_volume > *self,std::vector< meep::grid_volume >::difference_type i,std::vector< meep::grid_volume >::value_type const &x){
      *(swig::getpos(self,i)) = x;
    }
SWIGINTERN std::vector< meep::grid_volume >::value_type std_vector_Sl_meep_grid_volume_Sg__pop(std::vector< meep::grid_volume > *self){
      if (self->size() == 0)
	throw std::out_of_range("pop from empty container");
      std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >::value_type x = self->back();
      self->pop_back();
      return x;
    }
SWIGINTERN void std_vector_Sl_meep_grid_volume_Sg__append(std::vector< meep::grid_volume > *self,std::vector< meep::grid_volume >::value_type const &x){
      self->push_back(x);
    }
SWIGINTERN std::vector< meep::grid_volume >::iterator std_vector_Sl_meep_grid_volume_Sg__erase__SWIG_0(std::vector< meep::grid_volume > *self,std::vector< meep::grid_volume >::iterator pos){ return self->erase(pos); }
SWIGINTERN std::vector< meep::grid_volume >::iterator std_vector_Sl_meep_grid_volume_Sg__erase__SWIG_1(std::vector< meep::grid_volume > *self,std::vector< meep::grid_volume >::iterator first,std::vector< meep::grid_volume >::iterator last){ return self->erase(first, last); }
SWIGINTERN std::vector< meep::grid_volume >::iterator std_vector_Sl_meep_grid_volume_Sg__insert__SWIG_0(std::vector< meep::grid_volume > *self,std::vector< meep::grid_volume >::iterator pos,std::vector< meep::grid_volume >::value_type const &x){ return self->insert(pos, x); }
SWIGINTERN void std_vector_Sl_meep_grid_volume_Sg__insert__SWIG_1(std::vector< meep::grid_volume > *self,std::vector< meep::grid_volume >::iterator pos,std::vector< meep::grid_volume >::size_type n,std::vector< meep::grid_volume >::value_type const &x){ self->insert(pos, n, x); }

SWIGINTERNINLINE PyObject*
  SWIG_From_int  (int value)
{
  return PyInt_FromLong((long) value);
}


namespace swig {
  template <> struct traits< int > {
    typedef value_category category;
    static const char* type_name() { return"int"; }
  };
  template <>  struct traits_asval< int > {
    typedef int value_type;
    static int asval(PyObject *obj, value_type *val) {
      return SWIG_AsVal_int (obj, val);
    }
  };
  template <>  struct traits_from< int > {
    typedef int value_type;
    static PyObject *from(const value_type& val) {
      return SWIG_From_int  (val);
    }
  };
}


      namespace swig {
	template <>  struct traits<std::vector< int, std::allocator< int > > > {
	  typedef pointer_category category;
	  static const char* type_name() {
	    return "std::vector<" "int" "," "std::allocator< int >" " >";
	  }
	};
      }
    
SWIGINTERN swig::SwigPyIterator *std_vector_Sl_int_Sg__iterator(std::vector< int > *self,PyObject **PYTHON_SELF){
      return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
    }
SWIGINTERN bool std_vector_Sl_int_Sg____nonzero__(std::vector< int > const *self){
      return !(self->empty());
    }
SWIGINTERN bool std_vector_Sl_int_Sg____bool__(std::vector< int > const *self){
      return !(self->empty());
    }
SWIGINTERN std::vector< int >::size_type std_vector_Sl_int_Sg____len__(std::vector< int > const *self){
      return self->size();
    }
SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){
      return swig::getslice(self, i, j, 1);
    }
SWIGINTERN void std_vector_Sl_int_Sg____setslice____SWIG_0(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){
      swig::setslice(self, i, j, 1, std::vector< int,std::allocator< int > >());
    }
SWIGINTERN void std_vector_Sl_int_Sg____setslice____SWIG_1(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j,std::vector< int,std::allocator< int > > const &v){
      swig::setslice(self, i, j, 1, v);
    }
SWIGINTERN void std_vector_Sl_int_Sg____delslice__(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::difference_type j){
      swig::delslice(self, i, j, 1);
    }
SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_0(std::vector< int > *self,std::vector< int >::difference_type i){
      swig::erase(self, swig::getpos(self, i));
    }
SWIGINTERN std::vector< int,std::allocator< int > > *std_vector_Sl_int_Sg____getitem____SWIG_0(std::vector< int > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return NULL;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< int,std::allocator< int > >::difference_type id = i;
      std::vector< int,std::allocator< int > >::difference_type jd = j;
      return swig::getslice(self, id, jd, step);
    }
SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_0(std::vector< int > *self,PySliceObject *slice,std::vector< int,std::allocator< int > > const &v){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< int,std::allocator< int > >::difference_type id = i;
      std::vector< int,std::allocator< int > >::difference_type jd = j;
      swig::setslice(self, id, jd, step, v);
    }
SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_1(std::vector< int > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< int,std::allocator< int > >::difference_type id = i;
      std::vector< int,std::allocator< int > >::difference_type jd = j;
      swig::delslice(self, id, jd, step);
    }
SWIGINTERN void std_vector_Sl_int_Sg____delitem____SWIG_1(std::vector< int > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< int,std::allocator< int > >::difference_type id = i;
      std::vector< int,std::allocator< int > >::difference_type jd = j;
      swig::delslice(self, id, jd, step);
    }
SWIGINTERN std::vector< int >::value_type const &std_vector_Sl_int_Sg____getitem____SWIG_1(std::vector< int > const *self,std::vector< int >::difference_type i){
      return *(swig::cgetpos(self, i));
    }
SWIGINTERN void std_vector_Sl_int_Sg____setitem____SWIG_2(std::vector< int > *self,std::vector< int >::difference_type i,std::vector< int >::value_type const &x){
      *(swig::getpos(self,i)) = x;
    }
SWIGINTERN std::vector< int >::value_type std_vector_Sl_int_Sg__pop(std::vector< int > *self){
      if (self->size() == 0)
	throw std::out_of_range("pop from empty container");
      std::vector< int,std::allocator< int > >::value_type x = self->back();
      self->pop_back();
      return x;
    }
SWIGINTERN void std_vector_Sl_int_Sg__append(std::vector< int > *self,std::vector< int >::value_type const &x){
      self->push_back(x);
    }
SWIGINTERN std::vector< int >::iterator std_vector_Sl_int_Sg__erase__SWIG_0(std::vector< int > *self,std::vector< int >::iterator pos){ return self->erase(pos); }
SWIGINTERN std::vector< int >::iterator std_vector_Sl_int_Sg__erase__SWIG_1(std::vector< int > *self,std::vector< int >::iterator first,std::vector< int >::iterator last){ return self->erase(first, last); }
SWIGINTERN std::vector< int >::iterator std_vector_Sl_int_Sg__insert__SWIG_0(std::vector< int > *self,std::vector< int >::iterator pos,std::vector< int >::value_type const &x){ return self->insert(pos, x); }
SWIGINTERN void std_vector_Sl_int_Sg__insert__SWIG_1(std::vector< int > *self,std::vector< int >::iterator pos,std::vector< int >::size_type n,std::vector< int >::value_type const &x){ self->insert(pos, n, x); }

namespace swig {
  template <> struct traits< size_t > {
    typedef value_category category;
    static const char* type_name() { return"size_t"; }
  };
  template <>  struct traits_asval< size_t > {
    typedef size_t value_type;
    static int asval(PyObject *obj, value_type *val) {
      return SWIG_AsVal_size_t (obj, val);
    }
  };
  template <>  struct traits_from< size_t > {
    typedef size_t value_type;
    static PyObject *from(const value_type& val) {
      return SWIG_From_size_t  (val);
    }
  };
}


      namespace swig {
	template <>  struct traits<std::vector< size_t, std::allocator< size_t > > > {
	  typedef pointer_category category;
	  static const char* type_name() {
	    return "std::vector<" "size_t" "," "std::allocator< size_t >" " >";
	  }
	};
      }
    
SWIGINTERN swig::SwigPyIterator *std_vector_Sl_size_t_Sg__iterator(std::vector< size_t > *self,PyObject **PYTHON_SELF){
      return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
    }
SWIGINTERN bool std_vector_Sl_size_t_Sg____nonzero__(std::vector< size_t > const *self){
      return !(self->empty());
    }
SWIGINTERN bool std_vector_Sl_size_t_Sg____bool__(std::vector< size_t > const *self){
      return !(self->empty());
    }
SWIGINTERN std::vector< size_t >::size_type std_vector_Sl_size_t_Sg____len__(std::vector< size_t > const *self){
      return self->size();
    }
SWIGINTERN std::vector< size_t,std::allocator< size_t > > *std_vector_Sl_size_t_Sg____getslice__(std::vector< size_t > *self,std::vector< size_t >::difference_type i,std::vector< size_t >::difference_type j){
      return swig::getslice(self, i, j, 1);
    }
SWIGINTERN void std_vector_Sl_size_t_Sg____setslice____SWIG_0(std::vector< size_t > *self,std::vector< size_t >::difference_type i,std::vector< size_t >::difference_type j){
      swig::setslice(self, i, j, 1, std::vector< size_t,std::allocator< size_t > >());
    }
SWIGINTERN void std_vector_Sl_size_t_Sg____setslice____SWIG_1(std::vector< size_t > *self,std::vector< size_t >::difference_type i,std::vector< size_t >::difference_type j,std::vector< size_t,std::allocator< size_t > > const &v){
      swig::setslice(self, i, j, 1, v);
    }
SWIGINTERN void std_vector_Sl_size_t_Sg____delslice__(std::vector< size_t > *self,std::vector< size_t >::difference_type i,std::vector< size_t >::difference_type j){
      swig::delslice(self, i, j, 1);
    }
SWIGINTERN void std_vector_Sl_size_t_Sg____delitem____SWIG_0(std::vector< size_t > *self,std::vector< size_t >::difference_type i){
      swig::erase(self, swig::getpos(self, i));
    }
SWIGINTERN std::vector< size_t,std::allocator< size_t > > *std_vector_Sl_size_t_Sg____getitem____SWIG_0(std::vector< size_t > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return NULL;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< size_t,std::allocator< size_t > >::difference_type id = i;
      std::vector< size_t,std::allocator< size_t > >::difference_type jd = j;
      return swig::getslice(self, id, jd, step);
    }
SWIGINTERN void std_vector_Sl_size_t_Sg____setitem____SWIG_0(std::vector< size_t > *self,PySliceObject *slice,std::vector< size_t,std::allocator< size_t > > const &v){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< size_t,std::allocator< size_t > >::difference_type id = i;
      std::vector< size_t,std::allocator< size_t > >::difference_type jd = j;
      swig::setslice(self, id, jd, step, v);
    }
SWIGINTERN void std_vector_Sl_size_t_Sg____setitem____SWIG_1(std::vector< size_t > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< size_t,std::allocator< size_t > >::difference_type id = i;
      std::vector< size_t,std::allocator< size_t > >::difference_type jd = j;
      swig::delslice(self, id, jd, step);
    }
SWIGINTERN void std_vector_Sl_size_t_Sg____delitem____SWIG_1(std::vector< size_t > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< size_t,std::allocator< size_t > >::difference_type id = i;
      std::vector< size_t,std::allocator< size_t > >::difference_type jd = j;
      swig::delslice(self, id, jd, step);
    }
SWIGINTERN std::vector< size_t >::value_type const &std_vector_Sl_size_t_Sg____getitem____SWIG_1(std::vector< size_t > const *self,std::vector< size_t >::difference_type i){
      return *(swig::cgetpos(self, i));
    }
SWIGINTERN void std_vector_Sl_size_t_Sg____setitem____SWIG_2(std::vector< size_t > *self,std::vector< size_t >::difference_type i,std::vector< size_t >::value_type const &x){
      *(swig::getpos(self,i)) = x;
    }
SWIGINTERN std::vector< size_t >::value_type std_vector_Sl_size_t_Sg__pop(std::vector< size_t > *self){
      if (self->size() == 0)
	throw std::out_of_range("pop from empty container");
      std::vector< size_t,std::allocator< size_t > >::value_type x = self->back();
      self->pop_back();
      return x;
    }
SWIGINTERN void std_vector_Sl_size_t_Sg__append(std::vector< size_t > *self,std::vector< size_t >::value_type const &x){
      self->push_back(x);
    }
SWIGINTERN std::vector< size_t >::iterator std_vector_Sl_size_t_Sg__erase__SWIG_0(std::vector< size_t > *self,std::vector< size_t >::iterator pos){ return self->erase(pos); }
SWIGINTERN std::vector< size_t >::iterator std_vector_Sl_size_t_Sg__erase__SWIG_1(std::vector< size_t > *self,std::vector< size_t >::iterator first,std::vector< size_t >::iterator last){ return self->erase(first, last); }
SWIGINTERN std::vector< size_t >::iterator std_vector_Sl_size_t_Sg__insert__SWIG_0(std::vector< size_t > *self,std::vector< size_t >::iterator pos,std::vector< size_t >::value_type const &x){ return self->insert(pos, x); }
SWIGINTERN void std_vector_Sl_size_t_Sg__insert__SWIG_1(std::vector< size_t > *self,std::vector< size_t >::iterator pos,std::vector< size_t >::size_type n,std::vector< size_t >::value_type const &x){ self->insert(pos, n, x); }

  #define SWIG_From_double   PyFloat_FromDouble 


namespace swig {
  template <> struct traits< double > {
    typedef value_category category;
    static const char* type_name() { return"double"; }
  };
  template <>  struct traits_asval< double > {
    typedef double value_type;
    static int asval(PyObject *obj, value_type *val) {
      return SWIG_AsVal_double (obj, val);
    }
  };
  template <>  struct traits_from< double > {
    typedef double value_type;
    static PyObject *from(const value_type& val) {
      return SWIG_From_double  (val);
    }
  };
}


      namespace swig {
	template <>  struct traits<std::vector< double, std::allocator< double > > > {
	  typedef pointer_category category;
	  static const char* type_name() {
	    return "std::vector<" "double" "," "std::allocator< double >" " >";
	  }
	};
      }
    
SWIGINTERN swig::SwigPyIterator *std_vector_Sl_double_Sg__iterator(std::vector< double > *self,PyObject **PYTHON_SELF){
      return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
    }
SWIGINTERN bool std_vector_Sl_double_Sg____nonzero__(std::vector< double > const *self){
      return !(self->empty());
    }
SWIGINTERN bool std_vector_Sl_double_Sg____bool__(std::vector< double > const *self){
      return !(self->empty());
    }
SWIGINTERN std::vector< double >::size_type std_vector_Sl_double_Sg____len__(std::vector< double > const *self){
      return self->size();
    }
SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg____getslice__(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j){
      return swig::getslice(self, i, j, 1);
    }
SWIGINTERN void std_vector_Sl_double_Sg____setslice____SWIG_0(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j){
      swig::setslice(self, i, j, 1, std::vector< double,std::allocator< double > >());
    }
SWIGINTERN void std_vector_Sl_double_Sg____setslice____SWIG_1(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j,std::vector< double,std::allocator< double > > const &v){
      swig::setslice(self, i, j, 1, v);
    }
SWIGINTERN void std_vector_Sl_double_Sg____delslice__(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::difference_type j){
      swig::delslice(self, i, j, 1);
    }
SWIGINTERN void std_vector_Sl_double_Sg____delitem____SWIG_0(std::vector< double > *self,std::vector< double >::difference_type i){
      swig::erase(self, swig::getpos(self, i));
    }
SWIGINTERN std::vector< double,std::allocator< double > > *std_vector_Sl_double_Sg____getitem____SWIG_0(std::vector< double > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return NULL;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< double,std::allocator< double > >::difference_type id = i;
      std::vector< double,std::allocator< double > >::difference_type jd = j;
      return swig::getslice(self, id, jd, step);
    }
SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_0(std::vector< double > *self,PySliceObject *slice,std::vector< double,std::allocator< double > > const &v){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< double,std::allocator< double > >::difference_type id = i;
      std::vector< double,std::allocator< double > >::difference_type jd = j;
      swig::setslice(self, id, jd, step, v);
    }
SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_1(std::vector< double > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< double,std::allocator< double > >::difference_type id = i;
      std::vector< double,std::allocator< double > >::difference_type jd = j;
      swig::delslice(self, id, jd, step);
    }
SWIGINTERN void std_vector_Sl_double_Sg____delitem____SWIG_1(std::vector< double > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< double,std::allocator< double > >::difference_type id = i;
      std::vector< double,std::allocator< double > >::difference_type jd = j;
      swig::delslice(self, id, jd, step);
    }
SWIGINTERN std::vector< double >::value_type const &std_vector_Sl_double_Sg____getitem____SWIG_1(std::vector< double > const *self,std::vector< double >::difference_type i){
      return *(swig::cgetpos(self, i));
    }
SWIGINTERN void std_vector_Sl_double_Sg____setitem____SWIG_2(std::vector< double > *self,std::vector< double >::difference_type i,std::vector< double >::value_type const &x){
      *(swig::getpos(self,i)) = x;
    }
SWIGINTERN std::vector< double >::value_type std_vector_Sl_double_Sg__pop(std::vector< double > *self){
      if (self->size() == 0)
	throw std::out_of_range("pop from empty container");
      std::vector< double,std::allocator< double > >::value_type x = self->back();
      self->pop_back();
      return x;
    }
SWIGINTERN void std_vector_Sl_double_Sg__append(std::vector< double > *self,std::vector< double >::value_type const &x){
      self->push_back(x);
    }
SWIGINTERN std::vector< double >::iterator std_vector_Sl_double_Sg__erase__SWIG_0(std::vector< double > *self,std::vector< double >::iterator pos){ return self->erase(pos); }
SWIGINTERN std::vector< double >::iterator std_vector_Sl_double_Sg__erase__SWIG_1(std::vector< double > *self,std::vector< double >::iterator first,std::vector< double >::iterator last){ return self->erase(first, last); }
SWIGINTERN std::vector< double >::iterator std_vector_Sl_double_Sg__insert__SWIG_0(std::vector< double > *self,std::vector< double >::iterator pos,std::vector< double >::value_type const &x){ return self->insert(pos, x); }
SWIGINTERN void std_vector_Sl_double_Sg__insert__SWIG_1(std::vector< double > *self,std::vector< double >::iterator pos,std::vector< double >::size_type n,std::vector< double >::value_type const &x){ self->insert(pos, n, x); }

SWIGINTERN int
SWIG_AsVal_bool (PyObject *obj, bool *val)
{
  int r;
  if (!PyBool_Check(obj))
    return SWIG_ERROR;
  r = PyObject_IsTrue(obj);
  if (r == -1)
    return SWIG_ERROR;
  if (val) *val = r ? true : false;
  return SWIG_OK;
}


SWIGINTERNINLINE PyObject*
SWIG_From_std_complex_Sl_double_Sg_  (/*@SWIG:/opt/homebrew/Cellar/swig/4.0.2/share/swig/4.0.2/typemaps/swigmacros.swg,104,%ifcplusplus@*/

const std::complex<double>&



/*@SWIG@*/ c)
{
  return PyComplex_FromDoubles(std::real(c), std::imag(c));
}


SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)
{
  static int init = 0;
  static swig_type_info* info = 0;
  if (!init) {
    info = SWIG_TypeQuery("_p_char");
    init = 1;
  }
  return info;
}


SWIGINTERN int
SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
{
#if PY_VERSION_HEX>=0x03000000
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
  if (PyBytes_Check(obj))
#else
  if (PyUnicode_Check(obj))
#endif
#else  
  if (PyString_Check(obj))
#endif
  {
    char *cstr; Py_ssize_t len;
    int ret = SWIG_OK;
#if PY_VERSION_HEX>=0x03000000
#if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    if (!alloc && cptr) {
        /* We can't allow converting without allocation, since the internal
           representation of string in Python 3 is UCS-2/UCS-4 but we require
           a UTF-8 representation.
           TODO(bhy) More detailed explanation */
        return SWIG_RuntimeError;
    }
    obj = PyUnicode_AsUTF8String(obj);
    if (!obj)
      return SWIG_TypeError;
    if (alloc)
      *alloc = SWIG_NEWOBJ;
#endif
    if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1)
      return SWIG_TypeError;
#else
    if (PyString_AsStringAndSize(obj, &cstr, &len) == -1)
      return SWIG_TypeError;
#endif
    if (cptr) {
      if (alloc) {
	if (*alloc == SWIG_NEWOBJ) {
	  *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
	  *alloc = SWIG_NEWOBJ;
	} else {
	  *cptr = cstr;
	  *alloc = SWIG_OLDOBJ;
	}
      } else {
#if PY_VERSION_HEX>=0x03000000
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
	*cptr = PyBytes_AsString(obj);
#else
	assert(0); /* Should never reach here with Unicode strings in Python 3 */
#endif
#else
	*cptr = SWIG_Python_str_AsChar(obj);
        if (!*cptr)
          ret = SWIG_TypeError;
#endif
      }
    }
    if (psize) *psize = len + 1;
#if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    Py_XDECREF(obj);
#endif
    return ret;
  } else {
#if defined(SWIG_PYTHON_2_UNICODE)
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
#endif
#if PY_VERSION_HEX<0x03000000
    if (PyUnicode_Check(obj)) {
      char *cstr; Py_ssize_t len;
      if (!alloc && cptr) {
        return SWIG_RuntimeError;
      }
      obj = PyUnicode_AsUTF8String(obj);
      if (!obj)
        return SWIG_TypeError;
      if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
        if (cptr) {
          if (alloc) *alloc = SWIG_NEWOBJ;
          *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
        }
        if (psize) *psize = len + 1;

        Py_XDECREF(obj);
        return SWIG_OK;
      } else {
        Py_XDECREF(obj);
      }
    }
#endif
#endif

    swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    if (pchar_descriptor) {
      void* vptr = 0;
      if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
	if (cptr) *cptr = (char *) vptr;
	if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
	if (alloc) *alloc = SWIG_OLDOBJ;
	return SWIG_OK;
      }
    }
  }
  return SWIG_TypeError;
}





SWIGINTERNINLINE PyObject *
SWIG_FromCharPtrAndSize(const char* carray, size_t size)
{
  if (carray) {
    if (size > INT_MAX) {
      swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
      return pchar_descriptor ? 
	SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
    } else {
#if PY_VERSION_HEX >= 0x03000000
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
      return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#else
      return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
#endif
#else
      return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#endif
    }
  } else {
    return SWIG_Py_Void();
  }
}


SWIGINTERNINLINE PyObject * 
SWIG_FromCharPtr(const char *cptr)
{ 
  return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
}

SWIGINTERN char const *meep_vec___repr__(meep::vec *self){ return self->str(); }
SWIGINTERN char const *meep_ivec___repr__(meep::ivec *self){ return self->str(); }
SWIGINTERN char const *meep_volume___repr__(meep::volume *self){ return self->str(); }
SWIGINTERN char const *meep_grid_volume___repr__(meep::grid_volume *self){ return self->str(); }

/* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */
#ifndef SWIG_isfinite
/* isfinite() is a macro for C99 */
# if defined(isfinite)
#  define SWIG_isfinite(X) (isfinite(X))
# elif defined(__cplusplus) && __cplusplus >= 201103L
/* Use a template so that this works whether isfinite() is std::isfinite() or
 * in the global namespace.  The reality seems to vary between compiler
 * versions.
 *
 * Make sure namespace std exists to avoid compiler warnings.
 *
 * extern "C++" is required as this fragment can end up inside an extern "C" { } block
 */
namespace std { }
extern "C++" template<typename T>
inline int SWIG_isfinite_func(T x) {
  using namespace std;
  return isfinite(x);
}
#  define SWIG_isfinite(X) (SWIG_isfinite_func(X))
# elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
#  define SWIG_isfinite(X) (__builtin_isfinite(X))
# elif defined(__clang__) && defined(__has_builtin)
#  if __has_builtin(__builtin_isfinite)
#   define SWIG_isfinite(X) (__builtin_isfinite(X))
#  endif
# elif defined(_MSC_VER)
#  define SWIG_isfinite(X) (_finite(X))
# elif defined(__sun) && defined(__SVR4)
#  include <ieeefp.h>
#  define SWIG_isfinite(X) (finite(X))
# endif
#endif


/* Accept infinite as a valid float value unless we are unable to check if a value is finite */
#ifdef SWIG_isfinite
# define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX) && SWIG_isfinite(X))
#else
# define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX))
#endif


SWIGINTERN int
SWIG_AsVal_float (PyObject * obj, float *val)
{
  double v;
  int res = SWIG_AsVal_double (obj, &v);
  if (SWIG_IsOK(res)) {
    if (SWIG_Float_Overflow_Check(v)) {
      return SWIG_OverflowError;
    } else {
      if (val) *val = static_cast< float >(v);
    }
  }  
  return res;
}


SWIGINTERN int
SWIG_AsVal_std_complex_Sl_float_Sg_ (PyObject *o, std::complex<float> *val)
{
  if (PyComplex_Check(o)) {
    double re = PyComplex_RealAsDouble(o);
    double im = PyComplex_ImagAsDouble(o);
    if ((-FLT_MAX <= re && re <= FLT_MAX) && (-FLT_MAX <= im && im <= FLT_MAX)) {
      if (val) *val = std::complex<float>(static_cast< float >(re),
				  static_cast< float >(im));
      return SWIG_OK;
    } else {
      return SWIG_OverflowError;
    }    
  } else {
    float re;
    int res = SWIG_AddCast(SWIG_AsVal_float (o, &re));
    if (SWIG_IsOK(res)) {
      if (val) *val = std::complex<float>(re, 0.0);
      return res;
    }
  }
  return SWIG_TypeError;
}

SWIGINTERN bool meep_fields_is_periodic(meep::fields *self,meep::boundary_side side,meep::direction dir){
    return self->boundaries[side][dir] == meep::Periodic;
  }

SWIGINTERNINLINE PyObject *
SWIG_From_float  (float value)
{    
  return SWIG_From_double  (value);
}


  namespace swig {
    template <>  struct traits< meep::sourcedata > {
      typedef pointer_category category;
      static const char* type_name() { return"meep::sourcedata"; }
    };
  }


      namespace swig {
	template <>  struct traits<std::vector< meep::sourcedata, std::allocator< meep::sourcedata > > > {
	  typedef pointer_category category;
	  static const char* type_name() {
	    return "std::vector<" "meep::sourcedata" "," "std::allocator< meep::sourcedata >" " >";
	  }
	};
      }
    
SWIGINTERN swig::SwigPyIterator *std_vector_Sl_meep_sourcedata_Sg__iterator(std::vector< meep::sourcedata > *self,PyObject **PYTHON_SELF){
      return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
    }
SWIGINTERN bool std_vector_Sl_meep_sourcedata_Sg____nonzero__(std::vector< meep::sourcedata > const *self){
      return !(self->empty());
    }
SWIGINTERN bool std_vector_Sl_meep_sourcedata_Sg____bool__(std::vector< meep::sourcedata > const *self){
      return !(self->empty());
    }
SWIGINTERN std::vector< meep::sourcedata >::size_type std_vector_Sl_meep_sourcedata_Sg____len__(std::vector< meep::sourcedata > const *self){
      return self->size();
    }
SWIGINTERN std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > *std_vector_Sl_meep_sourcedata_Sg____getslice__(std::vector< meep::sourcedata > *self,std::vector< meep::sourcedata >::difference_type i,std::vector< meep::sourcedata >::difference_type j){
      return swig::getslice(self, i, j, 1);
    }
SWIGINTERN void std_vector_Sl_meep_sourcedata_Sg____setslice____SWIG_0(std::vector< meep::sourcedata > *self,std::vector< meep::sourcedata >::difference_type i,std::vector< meep::sourcedata >::difference_type j){
      swig::setslice(self, i, j, 1, std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >());
    }
SWIGINTERN void std_vector_Sl_meep_sourcedata_Sg____setslice____SWIG_1(std::vector< meep::sourcedata > *self,std::vector< meep::sourcedata >::difference_type i,std::vector< meep::sourcedata >::difference_type j,std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > const &v){
      swig::setslice(self, i, j, 1, v);
    }
SWIGINTERN void std_vector_Sl_meep_sourcedata_Sg____delslice__(std::vector< meep::sourcedata > *self,std::vector< meep::sourcedata >::difference_type i,std::vector< meep::sourcedata >::difference_type j){
      swig::delslice(self, i, j, 1);
    }
SWIGINTERN void std_vector_Sl_meep_sourcedata_Sg____delitem____SWIG_0(std::vector< meep::sourcedata > *self,std::vector< meep::sourcedata >::difference_type i){
      swig::erase(self, swig::getpos(self, i));
    }
SWIGINTERN std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > *std_vector_Sl_meep_sourcedata_Sg____getitem____SWIG_0(std::vector< meep::sourcedata > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return NULL;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >::difference_type id = i;
      std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >::difference_type jd = j;
      return swig::getslice(self, id, jd, step);
    }
SWIGINTERN void std_vector_Sl_meep_sourcedata_Sg____setitem____SWIG_0(std::vector< meep::sourcedata > *self,PySliceObject *slice,std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > const &v){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >::difference_type id = i;
      std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >::difference_type jd = j;
      swig::setslice(self, id, jd, step, v);
    }
SWIGINTERN void std_vector_Sl_meep_sourcedata_Sg____setitem____SWIG_1(std::vector< meep::sourcedata > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >::difference_type id = i;
      std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >::difference_type jd = j;
      swig::delslice(self, id, jd, step);
    }
SWIGINTERN void std_vector_Sl_meep_sourcedata_Sg____delitem____SWIG_1(std::vector< meep::sourcedata > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >::difference_type id = i;
      std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >::difference_type jd = j;
      swig::delslice(self, id, jd, step);
    }
SWIGINTERN std::vector< meep::sourcedata >::value_type const &std_vector_Sl_meep_sourcedata_Sg____getitem____SWIG_1(std::vector< meep::sourcedata > const *self,std::vector< meep::sourcedata >::difference_type i){
      return *(swig::cgetpos(self, i));
    }
SWIGINTERN void std_vector_Sl_meep_sourcedata_Sg____setitem____SWIG_2(std::vector< meep::sourcedata > *self,std::vector< meep::sourcedata >::difference_type i,std::vector< meep::sourcedata >::value_type const &x){
      *(swig::getpos(self,i)) = x;
    }
SWIGINTERN std::vector< meep::sourcedata >::value_type std_vector_Sl_meep_sourcedata_Sg__pop(std::vector< meep::sourcedata > *self){
      if (self->size() == 0)
	throw std::out_of_range("pop from empty container");
      std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >::value_type x = self->back();
      self->pop_back();
      return x;
    }
SWIGINTERN void std_vector_Sl_meep_sourcedata_Sg__append(std::vector< meep::sourcedata > *self,std::vector< meep::sourcedata >::value_type const &x){
      self->push_back(x);
    }
SWIGINTERN std::vector< meep::sourcedata >::iterator std_vector_Sl_meep_sourcedata_Sg__erase__SWIG_0(std::vector< meep::sourcedata > *self,std::vector< meep::sourcedata >::iterator pos){ return self->erase(pos); }
SWIGINTERN std::vector< meep::sourcedata >::iterator std_vector_Sl_meep_sourcedata_Sg__erase__SWIG_1(std::vector< meep::sourcedata > *self,std::vector< meep::sourcedata >::iterator first,std::vector< meep::sourcedata >::iterator last){ return self->erase(first, last); }
SWIGINTERN std::vector< meep::sourcedata >::iterator std_vector_Sl_meep_sourcedata_Sg__insert__SWIG_0(std::vector< meep::sourcedata > *self,std::vector< meep::sourcedata >::iterator pos,std::vector< meep::sourcedata >::value_type const &x){ return self->insert(pos, x); }
SWIGINTERN void std_vector_Sl_meep_sourcedata_Sg__insert__SWIG_1(std::vector< meep::sourcedata > *self,std::vector< meep::sourcedata >::iterator pos,std::vector< meep::sourcedata >::size_type n,std::vector< meep::sourcedata >::value_type const &x){ self->insert(pos, n, x); }

namespace swig {
  template <> struct traits< std::complex<double> > {
    typedef value_category category;
    static const char* type_name() { return"std::complex<double>"; }
  };
  template <>  struct traits_asval< std::complex<double> > {
    typedef std::complex<double> value_type;
    static int asval(PyObject *obj, value_type *val) {
      return SWIG_AsVal_std_complex_Sl_double_Sg_ (obj, val);
    }
  };
  template <>  struct traits_from< std::complex<double> > {
    typedef std::complex<double> value_type;
    static PyObject *from(const value_type& val) {
      return SWIG_From_std_complex_Sl_double_Sg_  (val);
    }
  };
}


      namespace swig {
	template <>  struct traits<std::vector< std::complex< double >, std::allocator< std::complex< double > > > > {
	  typedef pointer_category category;
	  static const char* type_name() {
	    return "std::vector<" "std::complex< double >" "," "std::allocator< std::complex< double > >" " >";
	  }
	};
      }
    
SWIGINTERN swig::SwigPyIterator *std_vector_Sl_std_complex_Sl_double_Sg__Sg__iterator(std::vector< std::complex< double > > *self,PyObject **PYTHON_SELF){
      return swig::make_output_iterator(self->begin(), self->begin(), self->end(), *PYTHON_SELF);
    }
SWIGINTERN bool std_vector_Sl_std_complex_Sl_double_Sg__Sg____nonzero__(std::vector< std::complex< double > > const *self){
      return !(self->empty());
    }
SWIGINTERN bool std_vector_Sl_std_complex_Sl_double_Sg__Sg____bool__(std::vector< std::complex< double > > const *self){
      return !(self->empty());
    }
SWIGINTERN std::vector< std::complex< double > >::size_type std_vector_Sl_std_complex_Sl_double_Sg__Sg____len__(std::vector< std::complex< double > > const *self){
      return self->size();
    }
SWIGINTERN std::vector< std::complex< double >,std::allocator< std::complex< double > > > *std_vector_Sl_std_complex_Sl_double_Sg__Sg____getslice__(std::vector< std::complex< double > > *self,std::vector< std::complex< double > >::difference_type i,std::vector< std::complex< double > >::difference_type j){
      return swig::getslice(self, i, j, 1);
    }
SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____setslice____SWIG_0(std::vector< std::complex< double > > *self,std::vector< std::complex< double > >::difference_type i,std::vector< std::complex< double > >::difference_type j){
      swig::setslice(self, i, j, 1, std::vector< std::complex< double >,std::allocator< std::complex< double > > >());
    }
SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____setslice____SWIG_1(std::vector< std::complex< double > > *self,std::vector< std::complex< double > >::difference_type i,std::vector< std::complex< double > >::difference_type j,std::vector< std::complex< double >,std::allocator< std::complex< double > > > const &v){
      swig::setslice(self, i, j, 1, v);
    }
SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____delslice__(std::vector< std::complex< double > > *self,std::vector< std::complex< double > >::difference_type i,std::vector< std::complex< double > >::difference_type j){
      swig::delslice(self, i, j, 1);
    }
SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____delitem____SWIG_0(std::vector< std::complex< double > > *self,std::vector< std::complex< double > >::difference_type i){
      swig::erase(self, swig::getpos(self, i));
    }
SWIGINTERN std::vector< std::complex< double >,std::allocator< std::complex< double > > > *std_vector_Sl_std_complex_Sl_double_Sg__Sg____getitem____SWIG_0(std::vector< std::complex< double > > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return NULL;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type id = i;
      std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type jd = j;
      return swig::getslice(self, id, jd, step);
    }
SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____setitem____SWIG_0(std::vector< std::complex< double > > *self,PySliceObject *slice,std::vector< std::complex< double >,std::allocator< std::complex< double > > > const &v){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type id = i;
      std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type jd = j;
      swig::setslice(self, id, jd, step, v);
    }
SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____setitem____SWIG_1(std::vector< std::complex< double > > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type id = i;
      std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type jd = j;
      swig::delslice(self, id, jd, step);
    }
SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____delitem____SWIG_1(std::vector< std::complex< double > > *self,PySliceObject *slice){
      Py_ssize_t i, j, step;
      if( !PySlice_Check(slice) ) {
        SWIG_Error(SWIG_TypeError, "Slice object expected.");
        return;
      }
      PySlice_GetIndices(SWIGPY_SLICE_ARG(slice), (Py_ssize_t)self->size(), &i, &j, &step);
      std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type id = i;
      std::vector< std::complex< double >,std::allocator< std::complex< double > > >::difference_type jd = j;
      swig::delslice(self, id, jd, step);
    }
SWIGINTERN std::vector< std::complex< double > >::value_type const &std_vector_Sl_std_complex_Sl_double_Sg__Sg____getitem____SWIG_1(std::vector< std::complex< double > > const *self,std::vector< std::complex< double > >::difference_type i){
      return *(swig::cgetpos(self, i));
    }
SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg____setitem____SWIG_2(std::vector< std::complex< double > > *self,std::vector< std::complex< double > >::difference_type i,std::vector< std::complex< double > >::value_type const &x){
      *(swig::getpos(self,i)) = x;
    }
SWIGINTERN std::vector< std::complex< double > >::value_type std_vector_Sl_std_complex_Sl_double_Sg__Sg__pop(std::vector< std::complex< double > > *self){
      if (self->size() == 0)
	throw std::out_of_range("pop from empty container");
      std::vector< std::complex< double >,std::allocator< std::complex< double > > >::value_type x = self->back();
      self->pop_back();
      return x;
    }
SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg__append(std::vector< std::complex< double > > *self,std::vector< std::complex< double > >::value_type const &x){
      self->push_back(x);
    }
SWIGINTERN std::vector< std::complex< double > >::iterator std_vector_Sl_std_complex_Sl_double_Sg__Sg__erase__SWIG_0(std::vector< std::complex< double > > *self,std::vector< std::complex< double > >::iterator pos){ return self->erase(pos); }
SWIGINTERN std::vector< std::complex< double > >::iterator std_vector_Sl_std_complex_Sl_double_Sg__Sg__erase__SWIG_1(std::vector< std::complex< double > > *self,std::vector< std::complex< double > >::iterator first,std::vector< std::complex< double > >::iterator last){ return self->erase(first, last); }
SWIGINTERN std::vector< std::complex< double > >::iterator std_vector_Sl_std_complex_Sl_double_Sg__Sg__insert__SWIG_0(std::vector< std::complex< double > > *self,std::vector< std::complex< double > >::iterator pos,std::vector< std::complex< double > >::value_type const &x){ return self->insert(pos, x); }
SWIGINTERN void std_vector_Sl_std_complex_Sl_double_Sg__Sg__insert__SWIG_1(std::vector< std::complex< double > > *self,std::vector< std::complex< double > >::iterator pos,std::vector< std::complex< double > >::size_type n,std::vector< std::complex< double > >::value_type const &x){ self->insert(pos, n, x); }
SWIGINTERN void delete_meep_eigenmode_data(meep::eigenmode_data *self){
        meep::destroy_eigenmode_data(self);
    }


size_t get_realnum_size() {
  return sizeof(meep::realnum);
}

bool is_single_precision() {
  return sizeof(meep::realnum) == sizeof(float);
}

meep::structure *create_structure(vector3 cell_size,
                                    std::vector<meep_geom::dft_data> dft_data_list_,
                                    std::vector<meep::volume> pml_1d_vols_,
                                    std::vector<meep::volume> pml_2d_vols_,
                                    std::vector<meep::volume> pml_3d_vols_,
                                    std::vector<meep::volume> absorber_vols_,
                                    meep::grid_volume &gv,
                                    const meep::boundary_region &br,
                                    const meep::symmetry &sym,
                                    int num_chunks,
                                    double Courant,
                                    bool use_anisotropic_averaging,
                                    double tol,
                                    int maxeval,
                                    geometric_object_list gobj_list,
                                    vector3 center,
                                    bool _ensure_periodicity,
                                    meep_geom::material_type _default_material,
                                    meep_geom::absorber_list alist,
                                    meep_geom::material_type_list extra_materials,
                                    bool split_chunks_evenly,
                                    bool set_materials,
                                    meep::structure *existing_s,
                                    bool output_chunk_costs,
                                    const meep::binary_partition *my_bp) {
    // Initialize fragment_stats static members (used for creating chunks in choose_chunkdivision)
    meep_geom::fragment_stats::geom = gobj_list;
    meep_geom::fragment_stats::dft_data_list = dft_data_list_;
    meep_geom::fragment_stats::pml_1d_vols = pml_1d_vols_;
    meep_geom::fragment_stats::pml_2d_vols = pml_2d_vols_;
    meep_geom::fragment_stats::pml_3d_vols = pml_3d_vols_;
    meep_geom::fragment_stats::absorber_vols = absorber_vols_;
    meep_geom::fragment_stats::tol = tol;
    meep_geom::fragment_stats::maxeval = maxeval;
    meep_geom::fragment_stats::resolution = gv.a;
    meep_geom::fragment_stats::dims = gv.dim;
    meep_geom::fragment_stats::split_chunks_evenly = split_chunks_evenly;
    meep_geom::init_libctl(_default_material, _ensure_periodicity,
                           &gv, cell_size, center, &gobj_list);

    if (output_chunk_costs) {
         meep::volume thev = gv.surroundings();
         std::unique_ptr<meep::binary_partition> bp;
         if (!my_bp) bp = meep::choose_chunkdivision(gv, thev, num_chunks, sym);
         std::vector<grid_volume> chunk_vols;
         std::vector<int> ids;
         meep::split_by_binarytree(gv, chunk_vols, ids, (!my_bp) ? bp.get() : my_bp);
         for (size_t i = 0; i < chunk_vols.size(); ++i)
              master_printf("CHUNK:, %2zu, %f, %zu\n",i,chunk_vols[i].get_cost(),chunk_vols[i].surface_area());
         return NULL;
    }

    meep::structure *s;
    if (existing_s) {
      s = existing_s;
    }
    else {
      s = new meep::structure(gv, NULL, br, sym, num_chunks, Courant,
                              use_anisotropic_averaging, tol, maxeval, my_bp);
    }
    s->shared_chunks = true;

    return s;
}
meep_geom::geom_epsilon* _set_materials(meep::structure * s,
                    vector3 cell_size,
                    meep::grid_volume &gv,
                    bool use_anisotropic_averaging,
                    double tol,
                    int maxeval,
                    geometric_object_list gobj_list,
                    vector3 center,
                    bool _ensure_periodicity,
                    meep_geom::material_type _default_material,
                    meep_geom::absorber_list alist,
                    meep_geom::material_type_list extra_materials,
                    bool split_chunks_evenly,
                    bool set_materials,
                    meep_geom::geom_epsilon *existing_geps,
                    bool output_chunk_costs,
                    const meep::binary_partition *my_bp) {

    meep_geom::geom_epsilon *geps;
    if (existing_geps) {
        geps = existing_geps;
    } else {
        geps = meep_geom::make_geom_epsilon(s, &gobj_list, center, _ensure_periodicity, _default_material,
                                                extra_materials);
    }
    if (set_materials) {
        meep_geom::set_materials_from_geom_epsilon(s, geps, use_anisotropic_averaging, tol,
                                             maxeval,alist);
    }

    if (meep::verbosity > 1 && !split_chunks_evenly && set_materials) {
      int num_procs = meep::count_processors();
      double *costs = new double[num_procs];
      for (int i = 0; i < num_procs; i++)
        costs[i] = 0;
      for (int i = 0; i < s->num_chunks; i++)
        costs[s->chunks[i]->n_proc()] += s->chunks[i]->gv.get_cost();
      double sum = 0, sumsq = 0;
      master_printf("estimated costs per process: ");
      for (int i = 0; i < num_procs; i++) {
        double cost = costs[i];
        sum += cost;
        sumsq += cost*cost;
        master_printf("%g%s", cost, i == num_procs - 1 ? "\n" : ", ");
      }
      delete[] costs;
      double mean = sum / num_procs;
      double stddev = sumsq - num_procs * mean * mean;
      stddev = num_procs == 1 || stddev <= 0 ? 0.0 : sqrt(stddev / (num_procs - 1));
      master_printf("estimated cost mean = %g, stddev = %g\n", mean, stddev);
    }

    // Return params to default state
    meep_geom::fragment_stats::resolution = 0;
    meep_geom::fragment_stats::split_chunks_evenly = false;

    return geps;
}

void _get_epsilon_grid(geometric_object_list gobj_list,
                       meep_geom::material_type_list mlist,
                       meep_geom::material_type _default_material,
                       bool _ensure_periodicity,
                       meep::grid_volume gv,
                       vector3 cell_size,
                       vector3 cell_center,
                       int nx, double *xtics,
                       int ny, double *ytics,
                       int nz, double *ztics,
                       std::complex<double> *grid_vals,
                       double frequency) {
     meep_geom::get_epsilon_grid(gobj_list,
                                 mlist,
                                 _default_material,
                                 _ensure_periodicity,
                                 gv,
                                 cell_size,
                                 cell_center,
                                 nx, xtics,
                                 ny, ytics,
                                 nz, ztics,
                                 grid_vals,
                                 frequency);
}


#ifdef __cplusplus
extern "C" {
#endif
SWIGINTERN PyObject *_wrap_delete_SwigPyIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_SwigPyIterator", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SwigPyIterator" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  delete arg1;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "SwigPyIterator_value", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_value" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  try {
    result = (PyObject *)((swig::SwigPyIterator const *)arg1)->value();
  } catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "SwigPyIterator_incr", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_incr" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  try {
    result = (swig::SwigPyIterator *)(arg1)->incr(arg2);
  } catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "SwigPyIterator_incr", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  try {
    result = (swig::SwigPyIterator *)(arg1)->incr();
  } catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_incr(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_SwigPyIterator_incr__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_SwigPyIterator_incr__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'SwigPyIterator_incr'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    swig::SwigPyIterator::incr(size_t)\n"
    "    swig::SwigPyIterator::incr()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "SwigPyIterator_decr", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_decr" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  try {
    result = (swig::SwigPyIterator *)(arg1)->decr(arg2);
  } catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "SwigPyIterator_decr", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  try {
    result = (swig::SwigPyIterator *)(arg1)->decr();
  } catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_decr(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_SwigPyIterator_decr__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_SwigPyIterator_decr__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'SwigPyIterator_decr'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    swig::SwigPyIterator::decr(size_t)\n"
    "    swig::SwigPyIterator::decr()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  swig::SwigPyIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  ptrdiff_t result;
  
  if (!PyArg_UnpackTuple(args, "SwigPyIterator_distance", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_distance" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
  try {
    result = ((swig::SwigPyIterator const *)arg1)->distance((swig::SwigPyIterator const &)*arg2);
  } catch(std::invalid_argument &_e) {
    SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail;
  }
  resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  swig::SwigPyIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "SwigPyIterator_equal", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_equal" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
  try {
    result = (bool)((swig::SwigPyIterator const *)arg1)->equal((swig::SwigPyIterator const &)*arg2);
  } catch(std::invalid_argument &_e) {
    SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail;
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "SwigPyIterator_copy", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_copy" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->copy();
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "SwigPyIterator_next", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_next" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  try {
    result = (PyObject *)(arg1)->next();
  } catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___next__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "SwigPyIterator___next__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___next__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  try {
    result = (PyObject *)(arg1)->__next__();
  } catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_previous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "SwigPyIterator_previous", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_previous" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  try {
    result = (PyObject *)(arg1)->previous();
  } catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_advance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  ptrdiff_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "SwigPyIterator_advance", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_advance" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_advance" "', argument " "2"" of type '" "ptrdiff_t""'");
  } 
  arg2 = static_cast< ptrdiff_t >(val2);
  try {
    result = (swig::SwigPyIterator *)(arg1)->advance(arg2);
  } catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  swig::SwigPyIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "SwigPyIterator___eq__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___eq__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
  result = (bool)((swig::SwigPyIterator const *)arg1)->operator ==((swig::SwigPyIterator const &)*arg2);
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  swig::SwigPyIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "SwigPyIterator___ne__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___ne__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
  result = (bool)((swig::SwigPyIterator const *)arg1)->operator !=((swig::SwigPyIterator const &)*arg2);
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  ptrdiff_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "SwigPyIterator___iadd__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___iadd__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___iadd__" "', argument " "2"" of type '" "ptrdiff_t""'");
  } 
  arg2 = static_cast< ptrdiff_t >(val2);
  try {
    result = (swig::SwigPyIterator *) &(arg1)->operator +=(arg2);
  } catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  ptrdiff_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "SwigPyIterator___isub__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___isub__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___isub__" "', argument " "2"" of type '" "ptrdiff_t""'");
  } 
  arg2 = static_cast< ptrdiff_t >(val2);
  try {
    result = (swig::SwigPyIterator *) &(arg1)->operator -=(arg2);
  } catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  ptrdiff_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "SwigPyIterator___add__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___add__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___add__" "', argument " "2"" of type '" "ptrdiff_t""'");
  } 
  arg2 = static_cast< ptrdiff_t >(val2);
  try {
    result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator +(arg2);
  } catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  ptrdiff_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "SwigPyIterator___sub__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "ptrdiff_t""'");
  } 
  arg2 = static_cast< ptrdiff_t >(val2);
  try {
    result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator -(arg2);
  } catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  swig::SwigPyIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  ptrdiff_t result;
  
  if (!PyArg_UnpackTuple(args, "SwigPyIterator___sub__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_swig__SwigPyIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
  result = ((swig::SwigPyIterator const *)arg1)->operator -((swig::SwigPyIterator const &)*arg2);
  resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___sub__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_SwigPyIterator___sub____SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_swig__SwigPyIterator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_SwigPyIterator___sub____SWIG_0(self, args);
      }
    }
  }
  
fail:
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *SwigPyIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_swig__SwigPyIterator, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_set_ctl_printf_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  void (*arg1)(char const *) = (void (*)(char const *)) 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "set_ctl_printf_callback", 1, 1, &obj0)) SWIG_fail;
  {
    int res = SWIG_ConvertFunctionPtr(obj0, (void**)(&arg1), SWIGTYPE_p_f_p_q_const__char__void);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "set_ctl_printf_callback" "', argument " "1"" of type '" "void (*)(char const *)""'"); 
    }
  }
  set_ctl_printf_callback(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_set_mpb_printf_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  void (*arg1)(char const *) = (void (*)(char const *)) 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "set_mpb_printf_callback", 1, 1, &obj0)) SWIG_fail;
  {
    int res = SWIG_ConvertFunctionPtr(obj0, (void**)(&arg1), SWIGTYPE_p_f_p_q_const__char__void);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "set_mpb_printf_callback" "', argument " "1"" of type '" "void (*)(char const *)""'"); 
    }
  }
  set_mpb_printf_callback(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_py_do_harminv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  int arg5 ;
  double arg6 ;
  double arg7 ;
  double arg8 ;
  double arg9 ;
  double arg10 ;
  double arg11 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  double val9 ;
  int ecode9 = 0 ;
  double val10 ;
  int ecode10 = 0 ;
  double val11 ;
  int ecode11 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "py_do_harminv", 11, 11, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
  arg1 = obj0;
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "py_do_harminv" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "py_do_harminv" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "py_do_harminv" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "py_do_harminv" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "py_do_harminv" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_double(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "py_do_harminv" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  ecode8 = SWIG_AsVal_double(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "py_do_harminv" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  ecode9 = SWIG_AsVal_double(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "py_do_harminv" "', argument " "9"" of type '" "double""'");
  } 
  arg9 = static_cast< double >(val9);
  ecode10 = SWIG_AsVal_double(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "py_do_harminv" "', argument " "10"" of type '" "double""'");
  } 
  arg10 = static_cast< double >(val10);
  ecode11 = SWIG_AsVal_double(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "py_do_harminv" "', argument " "11"" of type '" "double""'");
  } 
  arg11 = static_cast< double >(val11);
  result = (PyObject *)py_do_harminv(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap__get_farfield(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "_get_farfield", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_get_farfield" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "_get_farfield" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "_get_farfield" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  result = (PyObject *)_get_farfield(arg1,(meep::vec const &)*arg2);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap__get_farfields_array(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  meep::volume *arg2 = 0 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "_get_farfields_array", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_get_farfields_array" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "_get_farfields_array" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "_get_farfields_array" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "_get_farfields_array" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  result = (PyObject *)_get_farfields_array(arg1,(meep::volume const &)*arg2,arg3);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap__dft_ldos_ldos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_ldos *arg1 = (meep::dft_ldos *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "_dft_ldos_ldos", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_ldos, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_dft_ldos_ldos" "', argument " "1"" of type '" "meep::dft_ldos *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_ldos * >(argp1);
  result = (PyObject *)_dft_ldos_ldos(arg1);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap__dft_ldos_F(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_ldos *arg1 = (meep::dft_ldos *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "_dft_ldos_F", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_ldos, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_dft_ldos_F" "', argument " "1"" of type '" "meep::dft_ldos *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_ldos * >(argp1);
  result = (PyObject *)_dft_ldos_F(arg1);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap__dft_ldos_J(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_ldos *arg1 = (meep::dft_ldos *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "_dft_ldos_J", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_ldos, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_dft_ldos_J" "', argument " "1"" of type '" "meep::dft_ldos *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_ldos * >(argp1);
  result = (PyObject *)_dft_ldos_J(arg1);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap__get_dft_data_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  size_t result;
  
  if (!PyArg_UnpackTuple(args, "_get_dft_data_size", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_get_dft_data_size" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = _get_dft_data_size(arg1);
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap__get_dft_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  std::complex< double > *arg2 = (std::complex< double > *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyArrayObject *array2 = NULL ;
  int i2 = 1 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "_get_dft_data", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_get_dft_data" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  {
    array2 = obj_to_array_no_conversion(obj1, NPY_CDOUBLE);
    if (!array2 || !require_dimensions(array2,1) || !require_contiguous(array2)
      || !require_native(array2)) SWIG_fail;
    arg2 = (std::complex<double>*) array_data(array2);
    arg3 = 1;
    for (i2=0; i2 < array_numdims(array2); ++i2) arg3 *= array_size(array2,i2);
  }
  _get_dft_data(arg1,arg2,arg3);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap__load_dft_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  std::complex< double > *arg2 = (std::complex< double > *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyArrayObject *array2 = NULL ;
  int i2 = 1 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "_load_dft_data", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_load_dft_data" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  {
    array2 = obj_to_array_no_conversion(obj1, NPY_CDOUBLE);
    if (!array2 || !require_dimensions(array2,1) || !require_contiguous(array2)
      || !require_native(array2)) SWIG_fail;
    arg2 = (std::complex<double>*) array_data(array2);
    arg3 = 1;
    for (i2=0; i2 < array_numdims(array2); ++i2) arg3 *= array_size(array2,i2);
  }
  _load_dft_data(arg1,arg2,arg3);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_make_volume_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = 0 ;
  int arg2 ;
  std::complex< double > arg3 ;
  meep::volume_list *arg4 = (meep::volume_list *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  std::complex< double > val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::volume_list *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "make_volume_list", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "make_volume_list" "', argument " "1"" of type '" "meep::volume const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "make_volume_list" "', argument " "1"" of type '" "meep::volume const &""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "make_volume_list" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "make_volume_list" "', argument " "3"" of type '" "std::complex< double >""'");
  } 
  arg3 = static_cast< std::complex< double > >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "make_volume_list" "', argument " "4"" of type '" "meep::volume_list *""'"); 
  }
  arg4 = reinterpret_cast< meep::volume_list * >(argp4);
  result = (meep::volume_list *)make_volume_list((meep::volume const &)*arg1,arg2,arg3,arg4);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__volume_list, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap__get_gradient(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  double arg2 ;
  meep::dft_fields *arg3 = (meep::dft_fields *) 0 ;
  meep::dft_fields *arg4 = (meep::dft_fields *) 0 ;
  meep::dft_fields *arg5 = (meep::dft_fields *) 0 ;
  meep::dft_fields *arg6 = (meep::dft_fields *) 0 ;
  meep::dft_fields *arg7 = (meep::dft_fields *) 0 ;
  meep::dft_fields *arg8 = (meep::dft_fields *) 0 ;
  meep::grid_volume *arg9 = (meep::grid_volume *) 0 ;
  meep::volume *arg10 = (meep::volume *) 0 ;
  PyObject *arg11 = (PyObject *) 0 ;
  meep_geom::geom_epsilon *arg12 = (meep_geom::geom_epsilon *) 0 ;
  double arg13 ;
  double val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  void *argp12 = 0 ;
  int res12 = 0 ;
  double val13 ;
  int ecode13 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "_get_gradient", 13, 13, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12)) SWIG_fail;
  arg1 = obj0;
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "_get_gradient" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__dft_fields, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "_get_gradient" "', argument " "3"" of type '" "meep::dft_fields *""'"); 
  }
  arg3 = reinterpret_cast< meep::dft_fields * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__dft_fields, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "_get_gradient" "', argument " "4"" of type '" "meep::dft_fields *""'"); 
  }
  arg4 = reinterpret_cast< meep::dft_fields * >(argp4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_meep__dft_fields, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "_get_gradient" "', argument " "5"" of type '" "meep::dft_fields *""'"); 
  }
  arg5 = reinterpret_cast< meep::dft_fields * >(argp5);
  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_meep__dft_fields, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "_get_gradient" "', argument " "6"" of type '" "meep::dft_fields *""'"); 
  }
  arg6 = reinterpret_cast< meep::dft_fields * >(argp6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_meep__dft_fields, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "_get_gradient" "', argument " "7"" of type '" "meep::dft_fields *""'"); 
  }
  arg7 = reinterpret_cast< meep::dft_fields * >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_meep__dft_fields, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "_get_gradient" "', argument " "8"" of type '" "meep::dft_fields *""'"); 
  }
  arg8 = reinterpret_cast< meep::dft_fields * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "_get_gradient" "', argument " "9"" of type '" "meep::grid_volume *""'"); 
  }
  arg9 = reinterpret_cast< meep::grid_volume * >(argp9);
  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "_get_gradient" "', argument " "10"" of type '" "meep::volume *""'"); 
  }
  arg10 = reinterpret_cast< meep::volume * >(argp10);
  arg11 = obj10;
  res12 = SWIG_ConvertPtr(obj11, &argp12,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res12)) {
    SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "_get_gradient" "', argument " "12"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg12 = reinterpret_cast< meep_geom::geom_epsilon * >(argp12);
  ecode13 = SWIG_AsVal_double(obj12, &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "_get_gradient" "', argument " "13"" of type '" "double""'");
  } 
  arg13 = static_cast< double >(val13);
  _get_gradient(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_dft_flux_array(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  SwigValueWrapper< meep::dft_flux > arg2 ;
  meep::component arg3 ;
  int arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "get_dft_flux_array", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_dft_flux_array" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_flux,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_dft_flux_array" "', argument " "2"" of type '" "meep::dft_flux""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "get_dft_flux_array" "', argument " "2"" of type '" "meep::dft_flux""'");
    } else {
      meep::dft_flux * temp = reinterpret_cast< meep::dft_flux * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    arg3 = static_cast<meep::component>(PyInteger_AsLong(obj2));
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "get_dft_flux_array" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    try {
      result = (PyObject *)_get_dft_array< meep::dft_flux >(arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_dft_fields_array(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  SwigValueWrapper< meep::dft_fields > arg2 ;
  meep::component arg3 ;
  int arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "get_dft_fields_array", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_dft_fields_array" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_fields,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_dft_fields_array" "', argument " "2"" of type '" "meep::dft_fields""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "get_dft_fields_array" "', argument " "2"" of type '" "meep::dft_fields""'");
    } else {
      meep::dft_fields * temp = reinterpret_cast< meep::dft_fields * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    arg3 = static_cast<meep::component>(PyInteger_AsLong(obj2));
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "get_dft_fields_array" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    try {
      result = (PyObject *)_get_dft_array< meep::dft_fields >(arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_dft_force_array(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  SwigValueWrapper< meep::dft_force > arg2 ;
  meep::component arg3 ;
  int arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "get_dft_force_array", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_dft_force_array" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_force,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_dft_force_array" "', argument " "2"" of type '" "meep::dft_force""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "get_dft_force_array" "', argument " "2"" of type '" "meep::dft_force""'");
    } else {
      meep::dft_force * temp = reinterpret_cast< meep::dft_force * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    arg3 = static_cast<meep::component>(PyInteger_AsLong(obj2));
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "get_dft_force_array" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    try {
      result = (PyObject *)_get_dft_array< meep::dft_force >(arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_dft_near2far_array(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  SwigValueWrapper< meep::dft_near2far > arg2 ;
  meep::component arg3 ;
  int arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "get_dft_near2far_array", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_dft_near2far_array" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_near2far,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_dft_near2far_array" "', argument " "2"" of type '" "meep::dft_near2far""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "get_dft_near2far_array" "', argument " "2"" of type '" "meep::dft_near2far""'");
    } else {
      meep::dft_near2far * temp = reinterpret_cast< meep::dft_near2far * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    arg3 = static_cast<meep::component>(PyInteger_AsLong(obj2));
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "get_dft_near2far_array" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    try {
      result = (PyObject *)_get_dft_array< meep::dft_near2far >(arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  PyObject **arg2 = (PyObject **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  arg2 = &obj0;
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector_iterator", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector_iterator" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  {
    try {
      result = (swig::SwigPyIterator *)std_vector_Sl_meep_geom_fragment_stats_Sg__iterator(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector___nonzero__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector___nonzero__" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  {
    try {
      result = (bool)std_vector_Sl_meep_geom_fragment_stats_Sg____nonzero__((std::vector< meep_geom::fragment_stats > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector___bool__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector___bool__" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  {
    try {
      result = (bool)std_vector_Sl_meep_geom_fragment_stats_Sg____bool__((std::vector< meep_geom::fragment_stats > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep_geom::fragment_stats >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector___len__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector___len__" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  {
    try {
      result = std_vector_Sl_meep_geom_fragment_stats_Sg____len__((std::vector< meep_geom::fragment_stats > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  std::vector< meep_geom::fragment_stats >::difference_type arg2 ;
  std::vector< meep_geom::fragment_stats >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector___getslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector___getslice__" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FragmentStatsVector___getslice__" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep_geom::fragment_stats >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FragmentStatsVector___getslice__" "', argument " "3"" of type '" "std::vector< meep_geom::fragment_stats >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< meep_geom::fragment_stats >::difference_type >(val3);
  {
    try {
      try {
        result = (std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > > *)std_vector_Sl_meep_geom_fragment_stats_Sg____getslice__(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  std::vector< meep_geom::fragment_stats >::difference_type arg2 ;
  std::vector< meep_geom::fragment_stats >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector___setslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector___setslice__" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FragmentStatsVector___setslice__" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep_geom::fragment_stats >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FragmentStatsVector___setslice__" "', argument " "3"" of type '" "std::vector< meep_geom::fragment_stats >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< meep_geom::fragment_stats >::difference_type >(val3);
  {
    try {
      try {
        std_vector_Sl_meep_geom_fragment_stats_Sg____setslice____SWIG_0(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  std::vector< meep_geom::fragment_stats >::difference_type arg2 ;
  std::vector< meep_geom::fragment_stats >::difference_type arg3 ;
  std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > > *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector___setslice__", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector___setslice__" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FragmentStatsVector___setslice__" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep_geom::fragment_stats >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FragmentStatsVector___setslice__" "', argument " "3"" of type '" "std::vector< meep_geom::fragment_stats >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< meep_geom::fragment_stats >::difference_type >(val3);
  {
    std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > > *ptr = (std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "FragmentStatsVector___setslice__" "', argument " "4"" of type '" "std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FragmentStatsVector___setslice__" "', argument " "4"" of type '" "std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > > const &""'"); 
    }
    arg4 = ptr;
  }
  {
    try {
      try {
        std_vector_Sl_meep_geom_fragment_stats_Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > > const &)*arg4);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector___setslice__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_FragmentStatsVector___setslice____SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_FragmentStatsVector___setslice____SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'FragmentStatsVector___setslice__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep_geom::fragment_stats >::__setslice__(std::vector< meep_geom::fragment_stats >::difference_type,std::vector< meep_geom::fragment_stats >::difference_type)\n"
    "    std::vector< meep_geom::fragment_stats >::__setslice__(std::vector< meep_geom::fragment_stats >::difference_type,std::vector< meep_geom::fragment_stats >::difference_type,std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > > const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  std::vector< meep_geom::fragment_stats >::difference_type arg2 ;
  std::vector< meep_geom::fragment_stats >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector___delslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector___delslice__" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FragmentStatsVector___delslice__" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep_geom::fragment_stats >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FragmentStatsVector___delslice__" "', argument " "3"" of type '" "std::vector< meep_geom::fragment_stats >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< meep_geom::fragment_stats >::difference_type >(val3);
  {
    try {
      try {
        std_vector_Sl_meep_geom_fragment_stats_Sg____delslice__(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  std::vector< meep_geom::fragment_stats >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector___delitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector___delitem__" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FragmentStatsVector___delitem__" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep_geom::fragment_stats >::difference_type >(val2);
  {
    try {
      try {
        std_vector_Sl_meep_geom_fragment_stats_Sg____delitem____SWIG_0(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector___getitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector___getitem__" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FragmentStatsVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        result = (std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > > *)std_vector_Sl_meep_geom_fragment_stats_Sg____getitem____SWIG_0(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > > *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector___setitem__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector___setitem__" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FragmentStatsVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > > *ptr = (std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FragmentStatsVector___setitem__" "', argument " "3"" of type '" "std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FragmentStatsVector___setitem__" "', argument " "3"" of type '" "std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > > const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      try {
        std_vector_Sl_meep_geom_fragment_stats_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > > const &)*arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector___setitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector___setitem__" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FragmentStatsVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        std_vector_Sl_meep_geom_fragment_stats_Sg____setitem____SWIG_1(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector___delitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector___delitem__" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FragmentStatsVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        std_vector_Sl_meep_geom_fragment_stats_Sg____delitem____SWIG_1(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector___delitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_FragmentStatsVector___delitem____SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_FragmentStatsVector___delitem____SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'FragmentStatsVector___delitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep_geom::fragment_stats >::__delitem__(std::vector< meep_geom::fragment_stats >::difference_type)\n"
    "    std::vector< meep_geom::fragment_stats >::__delitem__(PySliceObject *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  std::vector< meep_geom::fragment_stats >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< meep_geom::fragment_stats >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector___getitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector___getitem__" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FragmentStatsVector___getitem__" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep_geom::fragment_stats >::difference_type >(val2);
  {
    try {
      try {
        result = (std::vector< meep_geom::fragment_stats >::value_type *) &std_vector_Sl_meep_geom_fragment_stats_Sg____getitem____SWIG_1((std::vector< meep_geom::fragment_stats > const *)arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  (void)swig::container_owner<swig::traits<std::vector< meep_geom::fragment_stats >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector___getitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_FragmentStatsVector___getitem____SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_FragmentStatsVector___getitem____SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'FragmentStatsVector___getitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep_geom::fragment_stats >::__getitem__(PySliceObject *)\n"
    "    std::vector< meep_geom::fragment_stats >::__getitem__(std::vector< meep_geom::fragment_stats >::difference_type) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  std::vector< meep_geom::fragment_stats >::difference_type arg2 ;
  std::vector< meep_geom::fragment_stats >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector___setitem__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector___setitem__" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FragmentStatsVector___setitem__" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep_geom::fragment_stats >::difference_type >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep_geom__fragment_stats,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FragmentStatsVector___setitem__" "', argument " "3"" of type '" "std::vector< meep_geom::fragment_stats >::value_type const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FragmentStatsVector___setitem__" "', argument " "3"" of type '" "std::vector< meep_geom::fragment_stats >::value_type const &""'"); 
  }
  arg3 = reinterpret_cast< std::vector< meep_geom::fragment_stats >::value_type * >(argp3);
  {
    try {
      try {
        std_vector_Sl_meep_geom_fragment_stats_Sg____setitem____SWIG_2(arg1,arg2,(meep_geom::fragment_stats const &)*arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector___setitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_FragmentStatsVector___setitem____SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_FragmentStatsVector___setitem____SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep_geom__fragment_stats, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_FragmentStatsVector___setitem____SWIG_2(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'FragmentStatsVector___setitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep_geom::fragment_stats >::__setitem__(PySliceObject *,std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > > const &)\n"
    "    std::vector< meep_geom::fragment_stats >::__setitem__(PySliceObject *)\n"
    "    std::vector< meep_geom::fragment_stats >::__setitem__(std::vector< meep_geom::fragment_stats >::difference_type,std::vector< meep_geom::fragment_stats >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep_geom::fragment_stats >::value_type result;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector_pop", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector_pop" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  {
    try {
      try {
        result = std_vector_Sl_meep_geom_fragment_stats_Sg__pop(arg1);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new std::vector< meep_geom::fragment_stats >::value_type(static_cast< const std::vector< meep_geom::fragment_stats >::value_type& >(result))), SWIGTYPE_p_meep_geom__fragment_stats, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  std::vector< meep_geom::fragment_stats >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector_append", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector_append" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep_geom__fragment_stats,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FragmentStatsVector_append" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats >::value_type const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FragmentStatsVector_append" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats >::value_type const &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< meep_geom::fragment_stats >::value_type * >(argp2);
  {
    try {
      std_vector_Sl_meep_geom_fragment_stats_Sg__append(arg1,(meep_geom::fragment_stats const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_FragmentStatsVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_FragmentStatsVector", 0, 0)) SWIG_fail;
  {
    try {
      result = (std::vector< meep_geom::fragment_stats > *)new std::vector< meep_geom::fragment_stats >();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_FragmentStatsVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  std::vector< meep_geom::fragment_stats > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_FragmentStatsVector", 1, 1, &obj0)) SWIG_fail;
  {
    std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > > *ptr = (std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > > *)0;
    res1 = swig::asptr(obj0, &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FragmentStatsVector" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FragmentStatsVector" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > const &""'"); 
    }
    arg1 = ptr;
  }
  {
    try {
      result = (std::vector< meep_geom::fragment_stats > *)new std::vector< meep_geom::fragment_stats >((std::vector< meep_geom::fragment_stats > const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector_empty", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector_empty" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  {
    try {
      result = (bool)((std::vector< meep_geom::fragment_stats > const *)arg1)->empty();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep_geom::fragment_stats >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector_size", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector_size" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  {
    try {
      result = ((std::vector< meep_geom::fragment_stats > const *)arg1)->size();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  std::vector< meep_geom::fragment_stats > *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector_swap", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector_swap" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FragmentStatsVector_swap" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats > &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FragmentStatsVector_swap" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats > &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp2);
  {
    try {
      (arg1)->swap(*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep_geom::fragment_stats >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector_begin", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector_begin" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  {
    try {
      result = (arg1)->begin();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep_geom::fragment_stats >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep_geom::fragment_stats >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector_end", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector_end" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  {
    try {
      result = (arg1)->end();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep_geom::fragment_stats >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep_geom::fragment_stats >::reverse_iterator result;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector_rbegin", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector_rbegin" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  {
    try {
      result = (arg1)->rbegin();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep_geom::fragment_stats >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep_geom::fragment_stats >::reverse_iterator result;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector_rend", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector_rend" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  {
    try {
      result = (arg1)->rend();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep_geom::fragment_stats >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector_clear", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector_clear" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  {
    try {
      (arg1)->clear();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  SwigValueWrapper< std::allocator< meep_geom::fragment_stats > > result;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector_get_allocator", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector_get_allocator" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  {
    try {
      result = ((std::vector< meep_geom::fragment_stats > const *)arg1)->get_allocator();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new std::vector< meep_geom::fragment_stats >::allocator_type(static_cast< const std::vector< meep_geom::fragment_stats >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_meep_geom__fragment_stats_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_FragmentStatsVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats >::size_type arg1 ;
  size_t val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep_geom::fragment_stats > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_FragmentStatsVector", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FragmentStatsVector" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats >::size_type""'");
  } 
  arg1 = static_cast< std::vector< meep_geom::fragment_stats >::size_type >(val1);
  {
    try {
      result = (std::vector< meep_geom::fragment_stats > *)new std::vector< meep_geom::fragment_stats >(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector_pop_back", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector_pop_back" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  {
    try {
      (arg1)->pop_back();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  std::vector< meep_geom::fragment_stats >::size_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector_resize", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector_resize" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FragmentStatsVector_resize" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats >::size_type""'");
  } 
  arg2 = static_cast< std::vector< meep_geom::fragment_stats >::size_type >(val2);
  {
    try {
      (arg1)->resize(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  std::vector< meep_geom::fragment_stats >::iterator arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< meep_geom::fragment_stats >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector_erase", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector_erase" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FragmentStatsVector_erase" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< meep_geom::fragment_stats >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< meep_geom::fragment_stats >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FragmentStatsVector_erase" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats >::iterator""'");
    }
  }
  {
    try {
      result = std_vector_Sl_meep_geom_fragment_stats_Sg__erase__SWIG_0(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep_geom::fragment_stats >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  std::vector< meep_geom::fragment_stats >::iterator arg2 ;
  std::vector< meep_geom::fragment_stats >::iterator arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  swig::SwigPyIterator *iter3 = 0 ;
  int res3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< meep_geom::fragment_stats >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector_erase", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector_erase" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FragmentStatsVector_erase" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< meep_geom::fragment_stats >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< meep_geom::fragment_stats >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FragmentStatsVector_erase" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats >::iterator""'");
    }
  }
  res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res3) || !iter3) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FragmentStatsVector_erase" "', argument " "3"" of type '" "std::vector< meep_geom::fragment_stats >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< meep_geom::fragment_stats >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< meep_geom::fragment_stats >::iterator > *>(iter3);
    if (iter_t) {
      arg3 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FragmentStatsVector_erase" "', argument " "3"" of type '" "std::vector< meep_geom::fragment_stats >::iterator""'");
    }
  }
  {
    try {
      result = std_vector_Sl_meep_geom_fragment_stats_Sg__erase__SWIG_1(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep_geom::fragment_stats >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_erase(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< meep_geom::fragment_stats >::iterator > *>(iter) != 0));
      if (_v) {
        return _wrap_FragmentStatsVector_erase__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< meep_geom::fragment_stats >::iterator > *>(iter) != 0));
      if (_v) {
        swig::SwigPyIterator *iter = 0;
        int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
        _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< meep_geom::fragment_stats >::iterator > *>(iter) != 0));
        if (_v) {
          return _wrap_FragmentStatsVector_erase__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'FragmentStatsVector_erase'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep_geom::fragment_stats >::erase(std::vector< meep_geom::fragment_stats >::iterator)\n"
    "    std::vector< meep_geom::fragment_stats >::erase(std::vector< meep_geom::fragment_stats >::iterator,std::vector< meep_geom::fragment_stats >::iterator)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_new_FragmentStatsVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats >::size_type arg1 ;
  std::vector< meep_geom::fragment_stats >::value_type *arg2 = 0 ;
  size_t val1 ;
  int ecode1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< meep_geom::fragment_stats > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_FragmentStatsVector", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FragmentStatsVector" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats >::size_type""'");
  } 
  arg1 = static_cast< std::vector< meep_geom::fragment_stats >::size_type >(val1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep_geom__fragment_stats,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FragmentStatsVector" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats >::value_type const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FragmentStatsVector" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats >::value_type const &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< meep_geom::fragment_stats >::value_type * >(argp2);
  {
    try {
      result = (std::vector< meep_geom::fragment_stats > *)new std::vector< meep_geom::fragment_stats >(arg1,(std::vector< meep_geom::fragment_stats >::value_type const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_FragmentStatsVector(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_FragmentStatsVector__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_FragmentStatsVector__SWIG_2(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_FragmentStatsVector__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep_geom__fragment_stats, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_new_FragmentStatsVector__SWIG_3(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_FragmentStatsVector'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep_geom::fragment_stats >::vector()\n"
    "    std::vector< meep_geom::fragment_stats >::vector(std::vector< meep_geom::fragment_stats > const &)\n"
    "    std::vector< meep_geom::fragment_stats >::vector(std::vector< meep_geom::fragment_stats >::size_type)\n"
    "    std::vector< meep_geom::fragment_stats >::vector(std::vector< meep_geom::fragment_stats >::size_type,std::vector< meep_geom::fragment_stats >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  std::vector< meep_geom::fragment_stats >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector_push_back", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector_push_back" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep_geom__fragment_stats,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FragmentStatsVector_push_back" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats >::value_type const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FragmentStatsVector_push_back" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats >::value_type const &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< meep_geom::fragment_stats >::value_type * >(argp2);
  {
    try {
      (arg1)->push_back((std::vector< meep_geom::fragment_stats >::value_type const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep_geom::fragment_stats >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector_front", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector_front" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  {
    try {
      result = (std::vector< meep_geom::fragment_stats >::value_type *) &((std::vector< meep_geom::fragment_stats > const *)arg1)->front();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  (void)swig::container_owner<swig::traits<std::vector< meep_geom::fragment_stats >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep_geom::fragment_stats >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector_back", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector_back" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  {
    try {
      result = (std::vector< meep_geom::fragment_stats >::value_type *) &((std::vector< meep_geom::fragment_stats > const *)arg1)->back();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  (void)swig::container_owner<swig::traits<std::vector< meep_geom::fragment_stats >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  std::vector< meep_geom::fragment_stats >::size_type arg2 ;
  std::vector< meep_geom::fragment_stats >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector_assign", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector_assign" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FragmentStatsVector_assign" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats >::size_type""'");
  } 
  arg2 = static_cast< std::vector< meep_geom::fragment_stats >::size_type >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep_geom__fragment_stats,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FragmentStatsVector_assign" "', argument " "3"" of type '" "std::vector< meep_geom::fragment_stats >::value_type const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FragmentStatsVector_assign" "', argument " "3"" of type '" "std::vector< meep_geom::fragment_stats >::value_type const &""'"); 
  }
  arg3 = reinterpret_cast< std::vector< meep_geom::fragment_stats >::value_type * >(argp3);
  {
    try {
      (arg1)->assign(arg2,(std::vector< meep_geom::fragment_stats >::value_type const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  std::vector< meep_geom::fragment_stats >::size_type arg2 ;
  std::vector< meep_geom::fragment_stats >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector_resize", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector_resize" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FragmentStatsVector_resize" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats >::size_type""'");
  } 
  arg2 = static_cast< std::vector< meep_geom::fragment_stats >::size_type >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep_geom__fragment_stats,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FragmentStatsVector_resize" "', argument " "3"" of type '" "std::vector< meep_geom::fragment_stats >::value_type const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FragmentStatsVector_resize" "', argument " "3"" of type '" "std::vector< meep_geom::fragment_stats >::value_type const &""'"); 
  }
  arg3 = reinterpret_cast< std::vector< meep_geom::fragment_stats >::value_type * >(argp3);
  {
    try {
      (arg1)->resize(arg2,(std::vector< meep_geom::fragment_stats >::value_type const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_resize(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_FragmentStatsVector_resize__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep_geom__fragment_stats, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_FragmentStatsVector_resize__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'FragmentStatsVector_resize'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep_geom::fragment_stats >::resize(std::vector< meep_geom::fragment_stats >::size_type)\n"
    "    std::vector< meep_geom::fragment_stats >::resize(std::vector< meep_geom::fragment_stats >::size_type,std::vector< meep_geom::fragment_stats >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  std::vector< meep_geom::fragment_stats >::iterator arg2 ;
  std::vector< meep_geom::fragment_stats >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< meep_geom::fragment_stats >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector_insert", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector_insert" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FragmentStatsVector_insert" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< meep_geom::fragment_stats >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< meep_geom::fragment_stats >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FragmentStatsVector_insert" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats >::iterator""'");
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep_geom__fragment_stats,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "FragmentStatsVector_insert" "', argument " "3"" of type '" "std::vector< meep_geom::fragment_stats >::value_type const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FragmentStatsVector_insert" "', argument " "3"" of type '" "std::vector< meep_geom::fragment_stats >::value_type const &""'"); 
  }
  arg3 = reinterpret_cast< std::vector< meep_geom::fragment_stats >::value_type * >(argp3);
  {
    try {
      result = std_vector_Sl_meep_geom_fragment_stats_Sg__insert__SWIG_0(arg1,arg2,(meep_geom::fragment_stats const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep_geom::fragment_stats >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  std::vector< meep_geom::fragment_stats >::iterator arg2 ;
  std::vector< meep_geom::fragment_stats >::size_type arg3 ;
  std::vector< meep_geom::fragment_stats >::value_type *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  size_t val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector_insert", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector_insert" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FragmentStatsVector_insert" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< meep_geom::fragment_stats >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< meep_geom::fragment_stats >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "FragmentStatsVector_insert" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats >::iterator""'");
    }
  }
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FragmentStatsVector_insert" "', argument " "3"" of type '" "std::vector< meep_geom::fragment_stats >::size_type""'");
  } 
  arg3 = static_cast< std::vector< meep_geom::fragment_stats >::size_type >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep_geom__fragment_stats,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "FragmentStatsVector_insert" "', argument " "4"" of type '" "std::vector< meep_geom::fragment_stats >::value_type const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FragmentStatsVector_insert" "', argument " "4"" of type '" "std::vector< meep_geom::fragment_stats >::value_type const &""'"); 
  }
  arg4 = reinterpret_cast< std::vector< meep_geom::fragment_stats >::value_type * >(argp4);
  {
    try {
      std_vector_Sl_meep_geom_fragment_stats_Sg__insert__SWIG_1(arg1,arg2,arg3,(meep_geom::fragment_stats const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_insert(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< meep_geom::fragment_stats >::iterator > *>(iter) != 0));
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep_geom__fragment_stats, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_FragmentStatsVector_insert__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< meep_geom::fragment_stats >::iterator > *>(iter) != 0));
      if (_v) {
        {
          int res = SWIG_AsVal_size_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep_geom__fragment_stats, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_FragmentStatsVector_insert__SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'FragmentStatsVector_insert'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep_geom::fragment_stats >::insert(std::vector< meep_geom::fragment_stats >::iterator,std::vector< meep_geom::fragment_stats >::value_type const &)\n"
    "    std::vector< meep_geom::fragment_stats >::insert(std::vector< meep_geom::fragment_stats >::iterator,std::vector< meep_geom::fragment_stats >::size_type,std::vector< meep_geom::fragment_stats >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  std::vector< meep_geom::fragment_stats >::size_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector_reserve", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector_reserve" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FragmentStatsVector_reserve" "', argument " "2"" of type '" "std::vector< meep_geom::fragment_stats >::size_type""'");
  } 
  arg2 = static_cast< std::vector< meep_geom::fragment_stats >::size_type >(val2);
  {
    try {
      (arg1)->reserve(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FragmentStatsVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep_geom::fragment_stats >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "FragmentStatsVector_capacity", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FragmentStatsVector_capacity" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  {
    try {
      result = ((std::vector< meep_geom::fragment_stats > const *)arg1)->capacity();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_FragmentStatsVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::fragment_stats > *arg1 = (std::vector< meep_geom::fragment_stats > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_FragmentStatsVector", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FragmentStatsVector" "', argument " "1"" of type '" "std::vector< meep_geom::fragment_stats > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::fragment_stats > * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *FragmentStatsVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *FragmentStatsVector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_DftDataVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  PyObject **arg2 = (PyObject **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  arg2 = &obj0;
  if (!PyArg_UnpackTuple(args, "DftDataVector_iterator", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector_iterator" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  {
    try {
      result = (swig::SwigPyIterator *)std_vector_Sl_meep_geom_dft_data_Sg__iterator(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector___nonzero__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector___nonzero__" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  {
    try {
      result = (bool)std_vector_Sl_meep_geom_dft_data_Sg____nonzero__((std::vector< meep_geom::dft_data > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector___bool__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector___bool__" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  {
    try {
      result = (bool)std_vector_Sl_meep_geom_dft_data_Sg____bool__((std::vector< meep_geom::dft_data > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep_geom::dft_data >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector___len__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector___len__" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  {
    try {
      result = std_vector_Sl_meep_geom_dft_data_Sg____len__((std::vector< meep_geom::dft_data > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  std::vector< meep_geom::dft_data >::difference_type arg2 ;
  std::vector< meep_geom::dft_data >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector___getslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector___getslice__" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DftDataVector___getslice__" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep_geom::dft_data >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DftDataVector___getslice__" "', argument " "3"" of type '" "std::vector< meep_geom::dft_data >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< meep_geom::dft_data >::difference_type >(val3);
  {
    try {
      try {
        result = (std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > *)std_vector_Sl_meep_geom_dft_data_Sg____getslice__(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  std::vector< meep_geom::dft_data >::difference_type arg2 ;
  std::vector< meep_geom::dft_data >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector___setslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector___setslice__" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DftDataVector___setslice__" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep_geom::dft_data >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DftDataVector___setslice__" "', argument " "3"" of type '" "std::vector< meep_geom::dft_data >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< meep_geom::dft_data >::difference_type >(val3);
  {
    try {
      try {
        std_vector_Sl_meep_geom_dft_data_Sg____setslice____SWIG_0(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  std::vector< meep_geom::dft_data >::difference_type arg2 ;
  std::vector< meep_geom::dft_data >::difference_type arg3 ;
  std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector___setslice__", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector___setslice__" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DftDataVector___setslice__" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep_geom::dft_data >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DftDataVector___setslice__" "', argument " "3"" of type '" "std::vector< meep_geom::dft_data >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< meep_geom::dft_data >::difference_type >(val3);
  {
    std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > *ptr = (std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DftDataVector___setslice__" "', argument " "4"" of type '" "std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DftDataVector___setslice__" "', argument " "4"" of type '" "std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > const &""'"); 
    }
    arg4 = ptr;
  }
  {
    try {
      try {
        std_vector_Sl_meep_geom_dft_data_Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > const &)*arg4);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector___setslice__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_DftDataVector___setslice____SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_DftDataVector___setslice____SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DftDataVector___setslice__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep_geom::dft_data >::__setslice__(std::vector< meep_geom::dft_data >::difference_type,std::vector< meep_geom::dft_data >::difference_type)\n"
    "    std::vector< meep_geom::dft_data >::__setslice__(std::vector< meep_geom::dft_data >::difference_type,std::vector< meep_geom::dft_data >::difference_type,std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_DftDataVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  std::vector< meep_geom::dft_data >::difference_type arg2 ;
  std::vector< meep_geom::dft_data >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector___delslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector___delslice__" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DftDataVector___delslice__" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep_geom::dft_data >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DftDataVector___delslice__" "', argument " "3"" of type '" "std::vector< meep_geom::dft_data >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< meep_geom::dft_data >::difference_type >(val3);
  {
    try {
      try {
        std_vector_Sl_meep_geom_dft_data_Sg____delslice__(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  std::vector< meep_geom::dft_data >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector___delitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector___delitem__" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DftDataVector___delitem__" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep_geom::dft_data >::difference_type >(val2);
  {
    try {
      try {
        std_vector_Sl_meep_geom_dft_data_Sg____delitem____SWIG_0(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector___getitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector___getitem__" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DftDataVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        result = (std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > *)std_vector_Sl_meep_geom_dft_data_Sg____getitem____SWIG_0(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector___setitem__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector___setitem__" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DftDataVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > *ptr = (std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DftDataVector___setitem__" "', argument " "3"" of type '" "std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DftDataVector___setitem__" "', argument " "3"" of type '" "std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      try {
        std_vector_Sl_meep_geom_dft_data_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > const &)*arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector___setitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector___setitem__" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DftDataVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        std_vector_Sl_meep_geom_dft_data_Sg____setitem____SWIG_1(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector___delitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector___delitem__" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DftDataVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        std_vector_Sl_meep_geom_dft_data_Sg____delitem____SWIG_1(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector___delitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_DftDataVector___delitem____SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_DftDataVector___delitem____SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DftDataVector___delitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep_geom::dft_data >::__delitem__(std::vector< meep_geom::dft_data >::difference_type)\n"
    "    std::vector< meep_geom::dft_data >::__delitem__(PySliceObject *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_DftDataVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  std::vector< meep_geom::dft_data >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< meep_geom::dft_data >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector___getitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector___getitem__" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DftDataVector___getitem__" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep_geom::dft_data >::difference_type >(val2);
  {
    try {
      try {
        result = (std::vector< meep_geom::dft_data >::value_type *) &std_vector_Sl_meep_geom_dft_data_Sg____getitem____SWIG_1((std::vector< meep_geom::dft_data > const *)arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep_geom__dft_data, 0 |  0 );
  (void)swig::container_owner<swig::traits<std::vector< meep_geom::dft_data >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector___getitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_DftDataVector___getitem____SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_DftDataVector___getitem____SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DftDataVector___getitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep_geom::dft_data >::__getitem__(PySliceObject *)\n"
    "    std::vector< meep_geom::dft_data >::__getitem__(std::vector< meep_geom::dft_data >::difference_type) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_DftDataVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  std::vector< meep_geom::dft_data >::difference_type arg2 ;
  std::vector< meep_geom::dft_data >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector___setitem__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector___setitem__" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DftDataVector___setitem__" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep_geom::dft_data >::difference_type >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep_geom__dft_data,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DftDataVector___setitem__" "', argument " "3"" of type '" "std::vector< meep_geom::dft_data >::value_type const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DftDataVector___setitem__" "', argument " "3"" of type '" "std::vector< meep_geom::dft_data >::value_type const &""'"); 
  }
  arg3 = reinterpret_cast< std::vector< meep_geom::dft_data >::value_type * >(argp3);
  {
    try {
      try {
        std_vector_Sl_meep_geom_dft_data_Sg____setitem____SWIG_2(arg1,arg2,(meep_geom::dft_data const &)*arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector___setitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_DftDataVector___setitem____SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_DftDataVector___setitem____SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep_geom__dft_data, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_DftDataVector___setitem____SWIG_2(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DftDataVector___setitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep_geom::dft_data >::__setitem__(PySliceObject *,std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > const &)\n"
    "    std::vector< meep_geom::dft_data >::__setitem__(PySliceObject *)\n"
    "    std::vector< meep_geom::dft_data >::__setitem__(std::vector< meep_geom::dft_data >::difference_type,std::vector< meep_geom::dft_data >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_DftDataVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  SwigValueWrapper< meep_geom::dft_data > result;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector_pop", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector_pop" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  {
    try {
      try {
        result = std_vector_Sl_meep_geom_dft_data_Sg__pop(arg1);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new std::vector< meep_geom::dft_data >::value_type(static_cast< const std::vector< meep_geom::dft_data >::value_type& >(result))), SWIGTYPE_p_meep_geom__dft_data, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  std::vector< meep_geom::dft_data >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector_append", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector_append" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep_geom__dft_data,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DftDataVector_append" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data >::value_type const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DftDataVector_append" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data >::value_type const &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< meep_geom::dft_data >::value_type * >(argp2);
  {
    try {
      std_vector_Sl_meep_geom_dft_data_Sg__append(arg1,(meep_geom::dft_data const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DftDataVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_DftDataVector", 0, 0)) SWIG_fail;
  {
    try {
      result = (std::vector< meep_geom::dft_data > *)new std::vector< meep_geom::dft_data >();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DftDataVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  std::vector< meep_geom::dft_data > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_DftDataVector", 1, 1, &obj0)) SWIG_fail;
  {
    std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > *ptr = (std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > *)0;
    res1 = swig::asptr(obj0, &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DftDataVector" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DftDataVector" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > const &""'"); 
    }
    arg1 = ptr;
  }
  {
    try {
      result = (std::vector< meep_geom::dft_data > *)new std::vector< meep_geom::dft_data >((std::vector< meep_geom::dft_data > const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector_empty", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector_empty" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  {
    try {
      result = (bool)((std::vector< meep_geom::dft_data > const *)arg1)->empty();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep_geom::dft_data >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector_size", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector_size" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  {
    try {
      result = ((std::vector< meep_geom::dft_data > const *)arg1)->size();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  std::vector< meep_geom::dft_data > *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector_swap", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector_swap" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DftDataVector_swap" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data > &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DftDataVector_swap" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data > &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp2);
  {
    try {
      (arg1)->swap(*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep_geom::dft_data >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector_begin", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector_begin" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  {
    try {
      result = (arg1)->begin();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep_geom::dft_data >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep_geom::dft_data >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector_end", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector_end" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  {
    try {
      result = (arg1)->end();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep_geom::dft_data >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep_geom::dft_data >::reverse_iterator result;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector_rbegin", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector_rbegin" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  {
    try {
      result = (arg1)->rbegin();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep_geom::dft_data >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep_geom::dft_data >::reverse_iterator result;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector_rend", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector_rend" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  {
    try {
      result = (arg1)->rend();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep_geom::dft_data >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector_clear", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector_clear" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  {
    try {
      (arg1)->clear();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  SwigValueWrapper< std::allocator< meep_geom::dft_data > > result;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector_get_allocator", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector_get_allocator" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  {
    try {
      result = ((std::vector< meep_geom::dft_data > const *)arg1)->get_allocator();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new std::vector< meep_geom::dft_data >::allocator_type(static_cast< const std::vector< meep_geom::dft_data >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_meep_geom__dft_data_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector_pop_back", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector_pop_back" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  {
    try {
      (arg1)->pop_back();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  std::vector< meep_geom::dft_data >::iterator arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< meep_geom::dft_data >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector_erase", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector_erase" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DftDataVector_erase" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< meep_geom::dft_data >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< meep_geom::dft_data >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DftDataVector_erase" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data >::iterator""'");
    }
  }
  {
    try {
      result = std_vector_Sl_meep_geom_dft_data_Sg__erase__SWIG_0(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep_geom::dft_data >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  std::vector< meep_geom::dft_data >::iterator arg2 ;
  std::vector< meep_geom::dft_data >::iterator arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  swig::SwigPyIterator *iter3 = 0 ;
  int res3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< meep_geom::dft_data >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector_erase", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector_erase" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DftDataVector_erase" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< meep_geom::dft_data >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< meep_geom::dft_data >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DftDataVector_erase" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data >::iterator""'");
    }
  }
  res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res3) || !iter3) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DftDataVector_erase" "', argument " "3"" of type '" "std::vector< meep_geom::dft_data >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< meep_geom::dft_data >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< meep_geom::dft_data >::iterator > *>(iter3);
    if (iter_t) {
      arg3 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DftDataVector_erase" "', argument " "3"" of type '" "std::vector< meep_geom::dft_data >::iterator""'");
    }
  }
  {
    try {
      result = std_vector_Sl_meep_geom_dft_data_Sg__erase__SWIG_1(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep_geom::dft_data >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector_erase(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< meep_geom::dft_data >::iterator > *>(iter) != 0));
      if (_v) {
        return _wrap_DftDataVector_erase__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< meep_geom::dft_data >::iterator > *>(iter) != 0));
      if (_v) {
        swig::SwigPyIterator *iter = 0;
        int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
        _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< meep_geom::dft_data >::iterator > *>(iter) != 0));
        if (_v) {
          return _wrap_DftDataVector_erase__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DftDataVector_erase'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep_geom::dft_data >::erase(std::vector< meep_geom::dft_data >::iterator)\n"
    "    std::vector< meep_geom::dft_data >::erase(std::vector< meep_geom::dft_data >::iterator,std::vector< meep_geom::dft_data >::iterator)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_new_DftDataVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data >::size_type arg1 ;
  std::vector< meep_geom::dft_data >::value_type *arg2 = 0 ;
  size_t val1 ;
  int ecode1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< meep_geom::dft_data > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_DftDataVector", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DftDataVector" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data >::size_type""'");
  } 
  arg1 = static_cast< std::vector< meep_geom::dft_data >::size_type >(val1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep_geom__dft_data,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DftDataVector" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data >::value_type const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DftDataVector" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data >::value_type const &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< meep_geom::dft_data >::value_type * >(argp2);
  {
    try {
      result = (std::vector< meep_geom::dft_data > *)new std::vector< meep_geom::dft_data >(arg1,(std::vector< meep_geom::dft_data >::value_type const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DftDataVector(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_DftDataVector__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_DftDataVector__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep_geom__dft_data, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_new_DftDataVector__SWIG_2(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_DftDataVector'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep_geom::dft_data >::vector()\n"
    "    std::vector< meep_geom::dft_data >::vector(std::vector< meep_geom::dft_data > const &)\n"
    "    std::vector< meep_geom::dft_data >::vector(std::vector< meep_geom::dft_data >::size_type,std::vector< meep_geom::dft_data >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_DftDataVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  std::vector< meep_geom::dft_data >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector_push_back", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector_push_back" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep_geom__dft_data,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DftDataVector_push_back" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data >::value_type const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DftDataVector_push_back" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data >::value_type const &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< meep_geom::dft_data >::value_type * >(argp2);
  {
    try {
      (arg1)->push_back((std::vector< meep_geom::dft_data >::value_type const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep_geom::dft_data >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector_front", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector_front" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  {
    try {
      result = (std::vector< meep_geom::dft_data >::value_type *) &((std::vector< meep_geom::dft_data > const *)arg1)->front();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep_geom__dft_data, 0 |  0 );
  (void)swig::container_owner<swig::traits<std::vector< meep_geom::dft_data >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep_geom::dft_data >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector_back", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector_back" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  {
    try {
      result = (std::vector< meep_geom::dft_data >::value_type *) &((std::vector< meep_geom::dft_data > const *)arg1)->back();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep_geom__dft_data, 0 |  0 );
  (void)swig::container_owner<swig::traits<std::vector< meep_geom::dft_data >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  std::vector< meep_geom::dft_data >::size_type arg2 ;
  std::vector< meep_geom::dft_data >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector_assign", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector_assign" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DftDataVector_assign" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data >::size_type""'");
  } 
  arg2 = static_cast< std::vector< meep_geom::dft_data >::size_type >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep_geom__dft_data,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DftDataVector_assign" "', argument " "3"" of type '" "std::vector< meep_geom::dft_data >::value_type const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DftDataVector_assign" "', argument " "3"" of type '" "std::vector< meep_geom::dft_data >::value_type const &""'"); 
  }
  arg3 = reinterpret_cast< std::vector< meep_geom::dft_data >::value_type * >(argp3);
  {
    try {
      (arg1)->assign(arg2,(std::vector< meep_geom::dft_data >::value_type const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  std::vector< meep_geom::dft_data >::iterator arg2 ;
  std::vector< meep_geom::dft_data >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< meep_geom::dft_data >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector_insert", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector_insert" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DftDataVector_insert" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< meep_geom::dft_data >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< meep_geom::dft_data >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DftDataVector_insert" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data >::iterator""'");
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep_geom__dft_data,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DftDataVector_insert" "', argument " "3"" of type '" "std::vector< meep_geom::dft_data >::value_type const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DftDataVector_insert" "', argument " "3"" of type '" "std::vector< meep_geom::dft_data >::value_type const &""'"); 
  }
  arg3 = reinterpret_cast< std::vector< meep_geom::dft_data >::value_type * >(argp3);
  {
    try {
      result = std_vector_Sl_meep_geom_dft_data_Sg__insert__SWIG_0(arg1,arg2,(meep_geom::dft_data const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep_geom::dft_data >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  std::vector< meep_geom::dft_data >::iterator arg2 ;
  std::vector< meep_geom::dft_data >::size_type arg3 ;
  std::vector< meep_geom::dft_data >::value_type *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  size_t val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector_insert", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector_insert" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DftDataVector_insert" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< meep_geom::dft_data >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< meep_geom::dft_data >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DftDataVector_insert" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data >::iterator""'");
    }
  }
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DftDataVector_insert" "', argument " "3"" of type '" "std::vector< meep_geom::dft_data >::size_type""'");
  } 
  arg3 = static_cast< std::vector< meep_geom::dft_data >::size_type >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep_geom__dft_data,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DftDataVector_insert" "', argument " "4"" of type '" "std::vector< meep_geom::dft_data >::value_type const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DftDataVector_insert" "', argument " "4"" of type '" "std::vector< meep_geom::dft_data >::value_type const &""'"); 
  }
  arg4 = reinterpret_cast< std::vector< meep_geom::dft_data >::value_type * >(argp4);
  {
    try {
      std_vector_Sl_meep_geom_dft_data_Sg__insert__SWIG_1(arg1,arg2,arg3,(meep_geom::dft_data const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector_insert(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< meep_geom::dft_data >::iterator > *>(iter) != 0));
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep_geom__dft_data, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_DftDataVector_insert__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< meep_geom::dft_data >::iterator > *>(iter) != 0));
      if (_v) {
        {
          int res = SWIG_AsVal_size_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep_geom__dft_data, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_DftDataVector_insert__SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DftDataVector_insert'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep_geom::dft_data >::insert(std::vector< meep_geom::dft_data >::iterator,std::vector< meep_geom::dft_data >::value_type const &)\n"
    "    std::vector< meep_geom::dft_data >::insert(std::vector< meep_geom::dft_data >::iterator,std::vector< meep_geom::dft_data >::size_type,std::vector< meep_geom::dft_data >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_DftDataVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  std::vector< meep_geom::dft_data >::size_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector_reserve", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector_reserve" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DftDataVector_reserve" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data >::size_type""'");
  } 
  arg2 = static_cast< std::vector< meep_geom::dft_data >::size_type >(val2);
  {
    try {
      (arg1)->reserve(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DftDataVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep_geom::dft_data >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "DftDataVector_capacity", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DftDataVector_capacity" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  {
    try {
      result = ((std::vector< meep_geom::dft_data > const *)arg1)->capacity();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_DftDataVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep_geom::dft_data > *arg1 = (std::vector< meep_geom::dft_data > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_DftDataVector", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DftDataVector" "', argument " "1"" of type '" "std::vector< meep_geom::dft_data > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep_geom::dft_data > * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *DftDataVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *DftDataVector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_VolumeVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  PyObject **arg2 = (PyObject **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  arg2 = &obj0;
  if (!PyArg_UnpackTuple(args, "VolumeVector_iterator", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector_iterator" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  {
    try {
      result = (swig::SwigPyIterator *)std_vector_Sl_meep_volume_Sg__iterator(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector___nonzero__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector___nonzero__" "', argument " "1"" of type '" "std::vector< meep::volume > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  {
    try {
      result = (bool)std_vector_Sl_meep_volume_Sg____nonzero__((std::vector< meep::volume > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector___bool__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector___bool__" "', argument " "1"" of type '" "std::vector< meep::volume > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  {
    try {
      result = (bool)std_vector_Sl_meep_volume_Sg____bool__((std::vector< meep::volume > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::volume >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector___len__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector___len__" "', argument " "1"" of type '" "std::vector< meep::volume > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  {
    try {
      result = std_vector_Sl_meep_volume_Sg____len__((std::vector< meep::volume > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  std::vector< meep::volume >::difference_type arg2 ;
  std::vector< meep::volume >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< meep::volume,std::allocator< meep::volume > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector___getslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector___getslice__" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VolumeVector___getslice__" "', argument " "2"" of type '" "std::vector< meep::volume >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep::volume >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VolumeVector___getslice__" "', argument " "3"" of type '" "std::vector< meep::volume >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< meep::volume >::difference_type >(val3);
  {
    try {
      try {
        result = (std::vector< meep::volume,std::allocator< meep::volume > > *)std_vector_Sl_meep_volume_Sg____getslice__(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  std::vector< meep::volume >::difference_type arg2 ;
  std::vector< meep::volume >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector___setslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector___setslice__" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VolumeVector___setslice__" "', argument " "2"" of type '" "std::vector< meep::volume >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep::volume >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VolumeVector___setslice__" "', argument " "3"" of type '" "std::vector< meep::volume >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< meep::volume >::difference_type >(val3);
  {
    try {
      try {
        std_vector_Sl_meep_volume_Sg____setslice____SWIG_0(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  std::vector< meep::volume >::difference_type arg2 ;
  std::vector< meep::volume >::difference_type arg3 ;
  std::vector< meep::volume,std::allocator< meep::volume > > *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector___setslice__", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector___setslice__" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VolumeVector___setslice__" "', argument " "2"" of type '" "std::vector< meep::volume >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep::volume >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VolumeVector___setslice__" "', argument " "3"" of type '" "std::vector< meep::volume >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< meep::volume >::difference_type >(val3);
  {
    std::vector< meep::volume,std::allocator< meep::volume > > *ptr = (std::vector< meep::volume,std::allocator< meep::volume > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VolumeVector___setslice__" "', argument " "4"" of type '" "std::vector< meep::volume,std::allocator< meep::volume > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VolumeVector___setslice__" "', argument " "4"" of type '" "std::vector< meep::volume,std::allocator< meep::volume > > const &""'"); 
    }
    arg4 = ptr;
  }
  {
    try {
      try {
        std_vector_Sl_meep_volume_Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< meep::volume,std::allocator< meep::volume > > const &)*arg4);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector___setslice__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::volume,std::allocator< meep::volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_VolumeVector___setslice____SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::volume,std::allocator< meep::volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< meep::volume,std::allocator< meep::volume > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_VolumeVector___setslice____SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'VolumeVector___setslice__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep::volume >::__setslice__(std::vector< meep::volume >::difference_type,std::vector< meep::volume >::difference_type)\n"
    "    std::vector< meep::volume >::__setslice__(std::vector< meep::volume >::difference_type,std::vector< meep::volume >::difference_type,std::vector< meep::volume,std::allocator< meep::volume > > const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_VolumeVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  std::vector< meep::volume >::difference_type arg2 ;
  std::vector< meep::volume >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector___delslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector___delslice__" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VolumeVector___delslice__" "', argument " "2"" of type '" "std::vector< meep::volume >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep::volume >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VolumeVector___delslice__" "', argument " "3"" of type '" "std::vector< meep::volume >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< meep::volume >::difference_type >(val3);
  {
    try {
      try {
        std_vector_Sl_meep_volume_Sg____delslice__(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  std::vector< meep::volume >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector___delitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector___delitem__" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VolumeVector___delitem__" "', argument " "2"" of type '" "std::vector< meep::volume >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep::volume >::difference_type >(val2);
  {
    try {
      try {
        std_vector_Sl_meep_volume_Sg____delitem____SWIG_0(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< meep::volume,std::allocator< meep::volume > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector___getitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector___getitem__" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VolumeVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        result = (std::vector< meep::volume,std::allocator< meep::volume > > *)std_vector_Sl_meep_volume_Sg____getitem____SWIG_0(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  std::vector< meep::volume,std::allocator< meep::volume > > *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector___setitem__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector___setitem__" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VolumeVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    std::vector< meep::volume,std::allocator< meep::volume > > *ptr = (std::vector< meep::volume,std::allocator< meep::volume > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VolumeVector___setitem__" "', argument " "3"" of type '" "std::vector< meep::volume,std::allocator< meep::volume > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VolumeVector___setitem__" "', argument " "3"" of type '" "std::vector< meep::volume,std::allocator< meep::volume > > const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      try {
        std_vector_Sl_meep_volume_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< meep::volume,std::allocator< meep::volume > > const &)*arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector___setitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector___setitem__" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VolumeVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        std_vector_Sl_meep_volume_Sg____setitem____SWIG_1(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector___delitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector___delitem__" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VolumeVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        std_vector_Sl_meep_volume_Sg____delitem____SWIG_1(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector___delitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::volume,std::allocator< meep::volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_VolumeVector___delitem____SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::volume,std::allocator< meep::volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_VolumeVector___delitem____SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'VolumeVector___delitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep::volume >::__delitem__(std::vector< meep::volume >::difference_type)\n"
    "    std::vector< meep::volume >::__delitem__(PySliceObject *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_VolumeVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  std::vector< meep::volume >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< meep::volume >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector___getitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector___getitem__" "', argument " "1"" of type '" "std::vector< meep::volume > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VolumeVector___getitem__" "', argument " "2"" of type '" "std::vector< meep::volume >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep::volume >::difference_type >(val2);
  {
    try {
      try {
        result = (std::vector< meep::volume >::value_type *) &std_vector_Sl_meep_volume_Sg____getitem____SWIG_1((std::vector< meep::volume > const *)arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__volume, 0 |  0 );
  (void)swig::container_owner<swig::traits<std::vector< meep::volume >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector___getitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::volume,std::allocator< meep::volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_VolumeVector___getitem____SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::volume,std::allocator< meep::volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_VolumeVector___getitem____SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'VolumeVector___getitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep::volume >::__getitem__(PySliceObject *)\n"
    "    std::vector< meep::volume >::__getitem__(std::vector< meep::volume >::difference_type) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_VolumeVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  std::vector< meep::volume >::difference_type arg2 ;
  std::vector< meep::volume >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector___setitem__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector___setitem__" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VolumeVector___setitem__" "', argument " "2"" of type '" "std::vector< meep::volume >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep::volume >::difference_type >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VolumeVector___setitem__" "', argument " "3"" of type '" "std::vector< meep::volume >::value_type const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VolumeVector___setitem__" "', argument " "3"" of type '" "std::vector< meep::volume >::value_type const &""'"); 
  }
  arg3 = reinterpret_cast< std::vector< meep::volume >::value_type * >(argp3);
  {
    try {
      try {
        std_vector_Sl_meep_volume_Sg____setitem____SWIG_2(arg1,arg2,(meep::volume const &)*arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector___setitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::volume,std::allocator< meep::volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_VolumeVector___setitem____SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::volume,std::allocator< meep::volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< meep::volume,std::allocator< meep::volume > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_VolumeVector___setitem____SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::volume,std::allocator< meep::volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_VolumeVector___setitem____SWIG_2(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'VolumeVector___setitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep::volume >::__setitem__(PySliceObject *,std::vector< meep::volume,std::allocator< meep::volume > > const &)\n"
    "    std::vector< meep::volume >::__setitem__(PySliceObject *)\n"
    "    std::vector< meep::volume >::__setitem__(std::vector< meep::volume >::difference_type,std::vector< meep::volume >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_VolumeVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  SwigValueWrapper< meep::volume > result;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector_pop", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector_pop" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  {
    try {
      try {
        result = std_vector_Sl_meep_volume_Sg__pop(arg1);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new std::vector< meep::volume >::value_type(static_cast< const std::vector< meep::volume >::value_type& >(result))), SWIGTYPE_p_meep__volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  std::vector< meep::volume >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector_append", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector_append" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VolumeVector_append" "', argument " "2"" of type '" "std::vector< meep::volume >::value_type const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VolumeVector_append" "', argument " "2"" of type '" "std::vector< meep::volume >::value_type const &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< meep::volume >::value_type * >(argp2);
  {
    try {
      std_vector_Sl_meep_volume_Sg__append(arg1,(meep::volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_VolumeVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_VolumeVector", 0, 0)) SWIG_fail;
  {
    try {
      result = (std::vector< meep::volume > *)new std::vector< meep::volume >();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_VolumeVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  std::vector< meep::volume > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_VolumeVector", 1, 1, &obj0)) SWIG_fail;
  {
    std::vector< meep::volume,std::allocator< meep::volume > > *ptr = (std::vector< meep::volume,std::allocator< meep::volume > > *)0;
    res1 = swig::asptr(obj0, &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_VolumeVector" "', argument " "1"" of type '" "std::vector< meep::volume > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VolumeVector" "', argument " "1"" of type '" "std::vector< meep::volume > const &""'"); 
    }
    arg1 = ptr;
  }
  {
    try {
      result = (std::vector< meep::volume > *)new std::vector< meep::volume >((std::vector< meep::volume > const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector_empty", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector_empty" "', argument " "1"" of type '" "std::vector< meep::volume > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  {
    try {
      result = (bool)((std::vector< meep::volume > const *)arg1)->empty();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::volume >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector_size", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector_size" "', argument " "1"" of type '" "std::vector< meep::volume > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  {
    try {
      result = ((std::vector< meep::volume > const *)arg1)->size();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  std::vector< meep::volume > *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector_swap", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector_swap" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VolumeVector_swap" "', argument " "2"" of type '" "std::vector< meep::volume > &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VolumeVector_swap" "', argument " "2"" of type '" "std::vector< meep::volume > &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< meep::volume > * >(argp2);
  {
    try {
      (arg1)->swap(*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::volume >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector_begin", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector_begin" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  {
    try {
      result = (arg1)->begin();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep::volume >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::volume >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector_end", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector_end" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  {
    try {
      result = (arg1)->end();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep::volume >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::volume >::reverse_iterator result;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector_rbegin", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector_rbegin" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  {
    try {
      result = (arg1)->rbegin();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep::volume >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::volume >::reverse_iterator result;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector_rend", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector_rend" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  {
    try {
      result = (arg1)->rend();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep::volume >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector_clear", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector_clear" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  {
    try {
      (arg1)->clear();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  SwigValueWrapper< std::allocator< meep::volume > > result;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector_get_allocator", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector_get_allocator" "', argument " "1"" of type '" "std::vector< meep::volume > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  {
    try {
      result = ((std::vector< meep::volume > const *)arg1)->get_allocator();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new std::vector< meep::volume >::allocator_type(static_cast< const std::vector< meep::volume >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_meep__volume_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector_pop_back", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector_pop_back" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  {
    try {
      (arg1)->pop_back();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  std::vector< meep::volume >::iterator arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< meep::volume >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector_erase", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector_erase" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VolumeVector_erase" "', argument " "2"" of type '" "std::vector< meep::volume >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< meep::volume >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::volume >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VolumeVector_erase" "', argument " "2"" of type '" "std::vector< meep::volume >::iterator""'");
    }
  }
  {
    try {
      result = std_vector_Sl_meep_volume_Sg__erase__SWIG_0(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep::volume >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  std::vector< meep::volume >::iterator arg2 ;
  std::vector< meep::volume >::iterator arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  swig::SwigPyIterator *iter3 = 0 ;
  int res3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< meep::volume >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector_erase", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector_erase" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VolumeVector_erase" "', argument " "2"" of type '" "std::vector< meep::volume >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< meep::volume >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::volume >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VolumeVector_erase" "', argument " "2"" of type '" "std::vector< meep::volume >::iterator""'");
    }
  }
  res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res3) || !iter3) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VolumeVector_erase" "', argument " "3"" of type '" "std::vector< meep::volume >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< meep::volume >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::volume >::iterator > *>(iter3);
    if (iter_t) {
      arg3 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VolumeVector_erase" "', argument " "3"" of type '" "std::vector< meep::volume >::iterator""'");
    }
  }
  {
    try {
      result = std_vector_Sl_meep_volume_Sg__erase__SWIG_1(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep::volume >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector_erase(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::volume,std::allocator< meep::volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::volume >::iterator > *>(iter) != 0));
      if (_v) {
        return _wrap_VolumeVector_erase__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::volume,std::allocator< meep::volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::volume >::iterator > *>(iter) != 0));
      if (_v) {
        swig::SwigPyIterator *iter = 0;
        int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
        _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::volume >::iterator > *>(iter) != 0));
        if (_v) {
          return _wrap_VolumeVector_erase__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'VolumeVector_erase'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep::volume >::erase(std::vector< meep::volume >::iterator)\n"
    "    std::vector< meep::volume >::erase(std::vector< meep::volume >::iterator,std::vector< meep::volume >::iterator)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_new_VolumeVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume >::size_type arg1 ;
  std::vector< meep::volume >::value_type *arg2 = 0 ;
  size_t val1 ;
  int ecode1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< meep::volume > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_VolumeVector", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VolumeVector" "', argument " "1"" of type '" "std::vector< meep::volume >::size_type""'");
  } 
  arg1 = static_cast< std::vector< meep::volume >::size_type >(val1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_VolumeVector" "', argument " "2"" of type '" "std::vector< meep::volume >::value_type const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_VolumeVector" "', argument " "2"" of type '" "std::vector< meep::volume >::value_type const &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< meep::volume >::value_type * >(argp2);
  {
    try {
      result = (std::vector< meep::volume > *)new std::vector< meep::volume >(arg1,(std::vector< meep::volume >::value_type const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_VolumeVector(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_VolumeVector__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::volume,std::allocator< meep::volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_VolumeVector__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_new_VolumeVector__SWIG_2(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_VolumeVector'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep::volume >::vector()\n"
    "    std::vector< meep::volume >::vector(std::vector< meep::volume > const &)\n"
    "    std::vector< meep::volume >::vector(std::vector< meep::volume >::size_type,std::vector< meep::volume >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_VolumeVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  std::vector< meep::volume >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector_push_back", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector_push_back" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VolumeVector_push_back" "', argument " "2"" of type '" "std::vector< meep::volume >::value_type const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VolumeVector_push_back" "', argument " "2"" of type '" "std::vector< meep::volume >::value_type const &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< meep::volume >::value_type * >(argp2);
  {
    try {
      (arg1)->push_back((std::vector< meep::volume >::value_type const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::volume >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector_front", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector_front" "', argument " "1"" of type '" "std::vector< meep::volume > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  {
    try {
      result = (std::vector< meep::volume >::value_type *) &((std::vector< meep::volume > const *)arg1)->front();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__volume, 0 |  0 );
  (void)swig::container_owner<swig::traits<std::vector< meep::volume >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::volume >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector_back", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector_back" "', argument " "1"" of type '" "std::vector< meep::volume > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  {
    try {
      result = (std::vector< meep::volume >::value_type *) &((std::vector< meep::volume > const *)arg1)->back();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__volume, 0 |  0 );
  (void)swig::container_owner<swig::traits<std::vector< meep::volume >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  std::vector< meep::volume >::size_type arg2 ;
  std::vector< meep::volume >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector_assign", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector_assign" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VolumeVector_assign" "', argument " "2"" of type '" "std::vector< meep::volume >::size_type""'");
  } 
  arg2 = static_cast< std::vector< meep::volume >::size_type >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VolumeVector_assign" "', argument " "3"" of type '" "std::vector< meep::volume >::value_type const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VolumeVector_assign" "', argument " "3"" of type '" "std::vector< meep::volume >::value_type const &""'"); 
  }
  arg3 = reinterpret_cast< std::vector< meep::volume >::value_type * >(argp3);
  {
    try {
      (arg1)->assign(arg2,(std::vector< meep::volume >::value_type const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  std::vector< meep::volume >::iterator arg2 ;
  std::vector< meep::volume >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< meep::volume >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector_insert", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector_insert" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VolumeVector_insert" "', argument " "2"" of type '" "std::vector< meep::volume >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< meep::volume >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::volume >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VolumeVector_insert" "', argument " "2"" of type '" "std::vector< meep::volume >::iterator""'");
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VolumeVector_insert" "', argument " "3"" of type '" "std::vector< meep::volume >::value_type const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VolumeVector_insert" "', argument " "3"" of type '" "std::vector< meep::volume >::value_type const &""'"); 
  }
  arg3 = reinterpret_cast< std::vector< meep::volume >::value_type * >(argp3);
  {
    try {
      result = std_vector_Sl_meep_volume_Sg__insert__SWIG_0(arg1,arg2,(meep::volume const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep::volume >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  std::vector< meep::volume >::iterator arg2 ;
  std::vector< meep::volume >::size_type arg3 ;
  std::vector< meep::volume >::value_type *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  size_t val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector_insert", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector_insert" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VolumeVector_insert" "', argument " "2"" of type '" "std::vector< meep::volume >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< meep::volume >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::volume >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "VolumeVector_insert" "', argument " "2"" of type '" "std::vector< meep::volume >::iterator""'");
    }
  }
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VolumeVector_insert" "', argument " "3"" of type '" "std::vector< meep::volume >::size_type""'");
  } 
  arg3 = static_cast< std::vector< meep::volume >::size_type >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VolumeVector_insert" "', argument " "4"" of type '" "std::vector< meep::volume >::value_type const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VolumeVector_insert" "', argument " "4"" of type '" "std::vector< meep::volume >::value_type const &""'"); 
  }
  arg4 = reinterpret_cast< std::vector< meep::volume >::value_type * >(argp4);
  {
    try {
      std_vector_Sl_meep_volume_Sg__insert__SWIG_1(arg1,arg2,arg3,(meep::volume const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector_insert(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::volume,std::allocator< meep::volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::volume >::iterator > *>(iter) != 0));
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_VolumeVector_insert__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::volume,std::allocator< meep::volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::volume >::iterator > *>(iter) != 0));
      if (_v) {
        {
          int res = SWIG_AsVal_size_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_VolumeVector_insert__SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'VolumeVector_insert'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep::volume >::insert(std::vector< meep::volume >::iterator,std::vector< meep::volume >::value_type const &)\n"
    "    std::vector< meep::volume >::insert(std::vector< meep::volume >::iterator,std::vector< meep::volume >::size_type,std::vector< meep::volume >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_VolumeVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  std::vector< meep::volume >::size_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector_reserve", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector_reserve" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VolumeVector_reserve" "', argument " "2"" of type '" "std::vector< meep::volume >::size_type""'");
  } 
  arg2 = static_cast< std::vector< meep::volume >::size_type >(val2);
  {
    try {
      (arg1)->reserve(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_VolumeVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::volume >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "VolumeVector_capacity", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VolumeVector_capacity" "', argument " "1"" of type '" "std::vector< meep::volume > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  {
    try {
      result = ((std::vector< meep::volume > const *)arg1)->capacity();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_VolumeVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::volume > *arg1 = (std::vector< meep::volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_VolumeVector", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VolumeVector" "', argument " "1"" of type '" "std::vector< meep::volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::volume > * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *VolumeVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *VolumeVector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_GridVolumeVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  PyObject **arg2 = (PyObject **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  arg2 = &obj0;
  if (!PyArg_UnpackTuple(args, "GridVolumeVector_iterator", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector_iterator" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  {
    try {
      result = (swig::SwigPyIterator *)std_vector_Sl_meep_grid_volume_Sg__iterator(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector___nonzero__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector___nonzero__" "', argument " "1"" of type '" "std::vector< meep::grid_volume > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  {
    try {
      result = (bool)std_vector_Sl_meep_grid_volume_Sg____nonzero__((std::vector< meep::grid_volume > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector___bool__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector___bool__" "', argument " "1"" of type '" "std::vector< meep::grid_volume > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  {
    try {
      result = (bool)std_vector_Sl_meep_grid_volume_Sg____bool__((std::vector< meep::grid_volume > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::grid_volume >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector___len__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector___len__" "', argument " "1"" of type '" "std::vector< meep::grid_volume > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  {
    try {
      result = std_vector_Sl_meep_grid_volume_Sg____len__((std::vector< meep::grid_volume > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  std::vector< meep::grid_volume >::difference_type arg2 ;
  std::vector< meep::grid_volume >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector___getslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector___getslice__" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GridVolumeVector___getslice__" "', argument " "2"" of type '" "std::vector< meep::grid_volume >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep::grid_volume >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GridVolumeVector___getslice__" "', argument " "3"" of type '" "std::vector< meep::grid_volume >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< meep::grid_volume >::difference_type >(val3);
  {
    try {
      try {
        result = (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > *)std_vector_Sl_meep_grid_volume_Sg____getslice__(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  std::vector< meep::grid_volume >::difference_type arg2 ;
  std::vector< meep::grid_volume >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector___setslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector___setslice__" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GridVolumeVector___setslice__" "', argument " "2"" of type '" "std::vector< meep::grid_volume >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep::grid_volume >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GridVolumeVector___setslice__" "', argument " "3"" of type '" "std::vector< meep::grid_volume >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< meep::grid_volume >::difference_type >(val3);
  {
    try {
      try {
        std_vector_Sl_meep_grid_volume_Sg____setslice____SWIG_0(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  std::vector< meep::grid_volume >::difference_type arg2 ;
  std::vector< meep::grid_volume >::difference_type arg3 ;
  std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector___setslice__", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector___setslice__" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GridVolumeVector___setslice__" "', argument " "2"" of type '" "std::vector< meep::grid_volume >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep::grid_volume >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GridVolumeVector___setslice__" "', argument " "3"" of type '" "std::vector< meep::grid_volume >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< meep::grid_volume >::difference_type >(val3);
  {
    std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > *ptr = (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "GridVolumeVector___setslice__" "', argument " "4"" of type '" "std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GridVolumeVector___setslice__" "', argument " "4"" of type '" "std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > const &""'"); 
    }
    arg4 = ptr;
  }
  {
    try {
      try {
        std_vector_Sl_meep_grid_volume_Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > const &)*arg4);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector___setslice__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_GridVolumeVector___setslice____SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_GridVolumeVector___setslice____SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'GridVolumeVector___setslice__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep::grid_volume >::__setslice__(std::vector< meep::grid_volume >::difference_type,std::vector< meep::grid_volume >::difference_type)\n"
    "    std::vector< meep::grid_volume >::__setslice__(std::vector< meep::grid_volume >::difference_type,std::vector< meep::grid_volume >::difference_type,std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  std::vector< meep::grid_volume >::difference_type arg2 ;
  std::vector< meep::grid_volume >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector___delslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector___delslice__" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GridVolumeVector___delslice__" "', argument " "2"" of type '" "std::vector< meep::grid_volume >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep::grid_volume >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GridVolumeVector___delslice__" "', argument " "3"" of type '" "std::vector< meep::grid_volume >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< meep::grid_volume >::difference_type >(val3);
  {
    try {
      try {
        std_vector_Sl_meep_grid_volume_Sg____delslice__(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  std::vector< meep::grid_volume >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector___delitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector___delitem__" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GridVolumeVector___delitem__" "', argument " "2"" of type '" "std::vector< meep::grid_volume >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep::grid_volume >::difference_type >(val2);
  {
    try {
      try {
        std_vector_Sl_meep_grid_volume_Sg____delitem____SWIG_0(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector___getitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector___getitem__" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "GridVolumeVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        result = (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > *)std_vector_Sl_meep_grid_volume_Sg____getitem____SWIG_0(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector___setitem__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector___setitem__" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "GridVolumeVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > *ptr = (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GridVolumeVector___setitem__" "', argument " "3"" of type '" "std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GridVolumeVector___setitem__" "', argument " "3"" of type '" "std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      try {
        std_vector_Sl_meep_grid_volume_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > const &)*arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector___setitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector___setitem__" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "GridVolumeVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        std_vector_Sl_meep_grid_volume_Sg____setitem____SWIG_1(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector___delitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector___delitem__" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "GridVolumeVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        std_vector_Sl_meep_grid_volume_Sg____delitem____SWIG_1(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector___delitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_GridVolumeVector___delitem____SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_GridVolumeVector___delitem____SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'GridVolumeVector___delitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep::grid_volume >::__delitem__(std::vector< meep::grid_volume >::difference_type)\n"
    "    std::vector< meep::grid_volume >::__delitem__(PySliceObject *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  std::vector< meep::grid_volume >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< meep::grid_volume >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector___getitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector___getitem__" "', argument " "1"" of type '" "std::vector< meep::grid_volume > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GridVolumeVector___getitem__" "', argument " "2"" of type '" "std::vector< meep::grid_volume >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep::grid_volume >::difference_type >(val2);
  {
    try {
      try {
        result = (std::vector< meep::grid_volume >::value_type *) &std_vector_Sl_meep_grid_volume_Sg____getitem____SWIG_1((std::vector< meep::grid_volume > const *)arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  (void)swig::container_owner<swig::traits<std::vector< meep::grid_volume >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector___getitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_GridVolumeVector___getitem____SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_GridVolumeVector___getitem____SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'GridVolumeVector___getitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep::grid_volume >::__getitem__(PySliceObject *)\n"
    "    std::vector< meep::grid_volume >::__getitem__(std::vector< meep::grid_volume >::difference_type) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  std::vector< meep::grid_volume >::difference_type arg2 ;
  std::vector< meep::grid_volume >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector___setitem__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector___setitem__" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GridVolumeVector___setitem__" "', argument " "2"" of type '" "std::vector< meep::grid_volume >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep::grid_volume >::difference_type >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GridVolumeVector___setitem__" "', argument " "3"" of type '" "std::vector< meep::grid_volume >::value_type const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GridVolumeVector___setitem__" "', argument " "3"" of type '" "std::vector< meep::grid_volume >::value_type const &""'"); 
  }
  arg3 = reinterpret_cast< std::vector< meep::grid_volume >::value_type * >(argp3);
  {
    try {
      try {
        std_vector_Sl_meep_grid_volume_Sg____setitem____SWIG_2(arg1,arg2,(meep::grid_volume const &)*arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector___setitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_GridVolumeVector___setitem____SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_GridVolumeVector___setitem____SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_GridVolumeVector___setitem____SWIG_2(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'GridVolumeVector___setitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep::grid_volume >::__setitem__(PySliceObject *,std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > const &)\n"
    "    std::vector< meep::grid_volume >::__setitem__(PySliceObject *)\n"
    "    std::vector< meep::grid_volume >::__setitem__(std::vector< meep::grid_volume >::difference_type,std::vector< meep::grid_volume >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::grid_volume >::value_type result;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector_pop", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector_pop" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  {
    try {
      try {
        result = std_vector_Sl_meep_grid_volume_Sg__pop(arg1);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new std::vector< meep::grid_volume >::value_type(static_cast< const std::vector< meep::grid_volume >::value_type& >(result))), SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  std::vector< meep::grid_volume >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector_append", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector_append" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridVolumeVector_append" "', argument " "2"" of type '" "std::vector< meep::grid_volume >::value_type const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GridVolumeVector_append" "', argument " "2"" of type '" "std::vector< meep::grid_volume >::value_type const &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< meep::grid_volume >::value_type * >(argp2);
  {
    try {
      std_vector_Sl_meep_grid_volume_Sg__append(arg1,(meep::grid_volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_GridVolumeVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_GridVolumeVector", 0, 0)) SWIG_fail;
  {
    try {
      result = (std::vector< meep::grid_volume > *)new std::vector< meep::grid_volume >();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_GridVolumeVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  std::vector< meep::grid_volume > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_GridVolumeVector", 1, 1, &obj0)) SWIG_fail;
  {
    std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > *ptr = (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > *)0;
    res1 = swig::asptr(obj0, &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GridVolumeVector" "', argument " "1"" of type '" "std::vector< meep::grid_volume > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GridVolumeVector" "', argument " "1"" of type '" "std::vector< meep::grid_volume > const &""'"); 
    }
    arg1 = ptr;
  }
  {
    try {
      result = (std::vector< meep::grid_volume > *)new std::vector< meep::grid_volume >((std::vector< meep::grid_volume > const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector_empty", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector_empty" "', argument " "1"" of type '" "std::vector< meep::grid_volume > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  {
    try {
      result = (bool)((std::vector< meep::grid_volume > const *)arg1)->empty();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::grid_volume >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector_size", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector_size" "', argument " "1"" of type '" "std::vector< meep::grid_volume > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  {
    try {
      result = ((std::vector< meep::grid_volume > const *)arg1)->size();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  std::vector< meep::grid_volume > *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector_swap", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector_swap" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridVolumeVector_swap" "', argument " "2"" of type '" "std::vector< meep::grid_volume > &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GridVolumeVector_swap" "', argument " "2"" of type '" "std::vector< meep::grid_volume > &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp2);
  {
    try {
      (arg1)->swap(*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::grid_volume >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector_begin", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector_begin" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  {
    try {
      result = (arg1)->begin();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep::grid_volume >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::grid_volume >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector_end", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector_end" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  {
    try {
      result = (arg1)->end();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep::grid_volume >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::grid_volume >::reverse_iterator result;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector_rbegin", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector_rbegin" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  {
    try {
      result = (arg1)->rbegin();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep::grid_volume >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::grid_volume >::reverse_iterator result;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector_rend", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector_rend" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  {
    try {
      result = (arg1)->rend();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep::grid_volume >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector_clear", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector_clear" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  {
    try {
      (arg1)->clear();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  SwigValueWrapper< std::allocator< meep::grid_volume > > result;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector_get_allocator", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector_get_allocator" "', argument " "1"" of type '" "std::vector< meep::grid_volume > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  {
    try {
      result = ((std::vector< meep::grid_volume > const *)arg1)->get_allocator();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new std::vector< meep::grid_volume >::allocator_type(static_cast< const std::vector< meep::grid_volume >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_meep__grid_volume_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_GridVolumeVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume >::size_type arg1 ;
  size_t val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::grid_volume > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_GridVolumeVector", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GridVolumeVector" "', argument " "1"" of type '" "std::vector< meep::grid_volume >::size_type""'");
  } 
  arg1 = static_cast< std::vector< meep::grid_volume >::size_type >(val1);
  {
    try {
      result = (std::vector< meep::grid_volume > *)new std::vector< meep::grid_volume >(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector_pop_back", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector_pop_back" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  {
    try {
      (arg1)->pop_back();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  std::vector< meep::grid_volume >::size_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector_resize", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector_resize" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GridVolumeVector_resize" "', argument " "2"" of type '" "std::vector< meep::grid_volume >::size_type""'");
  } 
  arg2 = static_cast< std::vector< meep::grid_volume >::size_type >(val2);
  {
    try {
      (arg1)->resize(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  std::vector< meep::grid_volume >::iterator arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< meep::grid_volume >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector_erase", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector_erase" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "GridVolumeVector_erase" "', argument " "2"" of type '" "std::vector< meep::grid_volume >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< meep::grid_volume >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::grid_volume >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "GridVolumeVector_erase" "', argument " "2"" of type '" "std::vector< meep::grid_volume >::iterator""'");
    }
  }
  {
    try {
      result = std_vector_Sl_meep_grid_volume_Sg__erase__SWIG_0(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep::grid_volume >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  std::vector< meep::grid_volume >::iterator arg2 ;
  std::vector< meep::grid_volume >::iterator arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  swig::SwigPyIterator *iter3 = 0 ;
  int res3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< meep::grid_volume >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector_erase", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector_erase" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "GridVolumeVector_erase" "', argument " "2"" of type '" "std::vector< meep::grid_volume >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< meep::grid_volume >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::grid_volume >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "GridVolumeVector_erase" "', argument " "2"" of type '" "std::vector< meep::grid_volume >::iterator""'");
    }
  }
  res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res3) || !iter3) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "GridVolumeVector_erase" "', argument " "3"" of type '" "std::vector< meep::grid_volume >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< meep::grid_volume >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::grid_volume >::iterator > *>(iter3);
    if (iter_t) {
      arg3 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "GridVolumeVector_erase" "', argument " "3"" of type '" "std::vector< meep::grid_volume >::iterator""'");
    }
  }
  {
    try {
      result = std_vector_Sl_meep_grid_volume_Sg__erase__SWIG_1(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep::grid_volume >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_erase(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::grid_volume >::iterator > *>(iter) != 0));
      if (_v) {
        return _wrap_GridVolumeVector_erase__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::grid_volume >::iterator > *>(iter) != 0));
      if (_v) {
        swig::SwigPyIterator *iter = 0;
        int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
        _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::grid_volume >::iterator > *>(iter) != 0));
        if (_v) {
          return _wrap_GridVolumeVector_erase__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'GridVolumeVector_erase'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep::grid_volume >::erase(std::vector< meep::grid_volume >::iterator)\n"
    "    std::vector< meep::grid_volume >::erase(std::vector< meep::grid_volume >::iterator,std::vector< meep::grid_volume >::iterator)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_new_GridVolumeVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume >::size_type arg1 ;
  std::vector< meep::grid_volume >::value_type *arg2 = 0 ;
  size_t val1 ;
  int ecode1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< meep::grid_volume > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_GridVolumeVector", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_GridVolumeVector" "', argument " "1"" of type '" "std::vector< meep::grid_volume >::size_type""'");
  } 
  arg1 = static_cast< std::vector< meep::grid_volume >::size_type >(val1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_GridVolumeVector" "', argument " "2"" of type '" "std::vector< meep::grid_volume >::value_type const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_GridVolumeVector" "', argument " "2"" of type '" "std::vector< meep::grid_volume >::value_type const &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< meep::grid_volume >::value_type * >(argp2);
  {
    try {
      result = (std::vector< meep::grid_volume > *)new std::vector< meep::grid_volume >(arg1,(std::vector< meep::grid_volume >::value_type const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_GridVolumeVector(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_GridVolumeVector__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_GridVolumeVector__SWIG_2(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_GridVolumeVector__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_new_GridVolumeVector__SWIG_3(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_GridVolumeVector'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep::grid_volume >::vector()\n"
    "    std::vector< meep::grid_volume >::vector(std::vector< meep::grid_volume > const &)\n"
    "    std::vector< meep::grid_volume >::vector(std::vector< meep::grid_volume >::size_type)\n"
    "    std::vector< meep::grid_volume >::vector(std::vector< meep::grid_volume >::size_type,std::vector< meep::grid_volume >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  std::vector< meep::grid_volume >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector_push_back", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector_push_back" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridVolumeVector_push_back" "', argument " "2"" of type '" "std::vector< meep::grid_volume >::value_type const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GridVolumeVector_push_back" "', argument " "2"" of type '" "std::vector< meep::grid_volume >::value_type const &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< meep::grid_volume >::value_type * >(argp2);
  {
    try {
      (arg1)->push_back((std::vector< meep::grid_volume >::value_type const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::grid_volume >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector_front", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector_front" "', argument " "1"" of type '" "std::vector< meep::grid_volume > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  {
    try {
      result = (std::vector< meep::grid_volume >::value_type *) &((std::vector< meep::grid_volume > const *)arg1)->front();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  (void)swig::container_owner<swig::traits<std::vector< meep::grid_volume >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::grid_volume >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector_back", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector_back" "', argument " "1"" of type '" "std::vector< meep::grid_volume > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  {
    try {
      result = (std::vector< meep::grid_volume >::value_type *) &((std::vector< meep::grid_volume > const *)arg1)->back();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  (void)swig::container_owner<swig::traits<std::vector< meep::grid_volume >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  std::vector< meep::grid_volume >::size_type arg2 ;
  std::vector< meep::grid_volume >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector_assign", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector_assign" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GridVolumeVector_assign" "', argument " "2"" of type '" "std::vector< meep::grid_volume >::size_type""'");
  } 
  arg2 = static_cast< std::vector< meep::grid_volume >::size_type >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GridVolumeVector_assign" "', argument " "3"" of type '" "std::vector< meep::grid_volume >::value_type const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GridVolumeVector_assign" "', argument " "3"" of type '" "std::vector< meep::grid_volume >::value_type const &""'"); 
  }
  arg3 = reinterpret_cast< std::vector< meep::grid_volume >::value_type * >(argp3);
  {
    try {
      (arg1)->assign(arg2,(std::vector< meep::grid_volume >::value_type const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  std::vector< meep::grid_volume >::size_type arg2 ;
  std::vector< meep::grid_volume >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector_resize", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector_resize" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GridVolumeVector_resize" "', argument " "2"" of type '" "std::vector< meep::grid_volume >::size_type""'");
  } 
  arg2 = static_cast< std::vector< meep::grid_volume >::size_type >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GridVolumeVector_resize" "', argument " "3"" of type '" "std::vector< meep::grid_volume >::value_type const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GridVolumeVector_resize" "', argument " "3"" of type '" "std::vector< meep::grid_volume >::value_type const &""'"); 
  }
  arg3 = reinterpret_cast< std::vector< meep::grid_volume >::value_type * >(argp3);
  {
    try {
      (arg1)->resize(arg2,(std::vector< meep::grid_volume >::value_type const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_resize(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_GridVolumeVector_resize__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_GridVolumeVector_resize__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'GridVolumeVector_resize'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep::grid_volume >::resize(std::vector< meep::grid_volume >::size_type)\n"
    "    std::vector< meep::grid_volume >::resize(std::vector< meep::grid_volume >::size_type,std::vector< meep::grid_volume >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  std::vector< meep::grid_volume >::iterator arg2 ;
  std::vector< meep::grid_volume >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< meep::grid_volume >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector_insert", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector_insert" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "GridVolumeVector_insert" "', argument " "2"" of type '" "std::vector< meep::grid_volume >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< meep::grid_volume >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::grid_volume >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "GridVolumeVector_insert" "', argument " "2"" of type '" "std::vector< meep::grid_volume >::iterator""'");
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GridVolumeVector_insert" "', argument " "3"" of type '" "std::vector< meep::grid_volume >::value_type const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GridVolumeVector_insert" "', argument " "3"" of type '" "std::vector< meep::grid_volume >::value_type const &""'"); 
  }
  arg3 = reinterpret_cast< std::vector< meep::grid_volume >::value_type * >(argp3);
  {
    try {
      result = std_vector_Sl_meep_grid_volume_Sg__insert__SWIG_0(arg1,arg2,(meep::grid_volume const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep::grid_volume >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  std::vector< meep::grid_volume >::iterator arg2 ;
  std::vector< meep::grid_volume >::size_type arg3 ;
  std::vector< meep::grid_volume >::value_type *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  size_t val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector_insert", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector_insert" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "GridVolumeVector_insert" "', argument " "2"" of type '" "std::vector< meep::grid_volume >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< meep::grid_volume >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::grid_volume >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "GridVolumeVector_insert" "', argument " "2"" of type '" "std::vector< meep::grid_volume >::iterator""'");
    }
  }
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GridVolumeVector_insert" "', argument " "3"" of type '" "std::vector< meep::grid_volume >::size_type""'");
  } 
  arg3 = static_cast< std::vector< meep::grid_volume >::size_type >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "GridVolumeVector_insert" "', argument " "4"" of type '" "std::vector< meep::grid_volume >::value_type const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GridVolumeVector_insert" "', argument " "4"" of type '" "std::vector< meep::grid_volume >::value_type const &""'"); 
  }
  arg4 = reinterpret_cast< std::vector< meep::grid_volume >::value_type * >(argp4);
  {
    try {
      std_vector_Sl_meep_grid_volume_Sg__insert__SWIG_1(arg1,arg2,arg3,(meep::grid_volume const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_insert(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::grid_volume >::iterator > *>(iter) != 0));
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_GridVolumeVector_insert__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::grid_volume >::iterator > *>(iter) != 0));
      if (_v) {
        {
          int res = SWIG_AsVal_size_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_GridVolumeVector_insert__SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'GridVolumeVector_insert'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep::grid_volume >::insert(std::vector< meep::grid_volume >::iterator,std::vector< meep::grid_volume >::value_type const &)\n"
    "    std::vector< meep::grid_volume >::insert(std::vector< meep::grid_volume >::iterator,std::vector< meep::grid_volume >::size_type,std::vector< meep::grid_volume >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  std::vector< meep::grid_volume >::size_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector_reserve", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector_reserve" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GridVolumeVector_reserve" "', argument " "2"" of type '" "std::vector< meep::grid_volume >::size_type""'");
  } 
  arg2 = static_cast< std::vector< meep::grid_volume >::size_type >(val2);
  {
    try {
      (arg1)->reserve(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GridVolumeVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::grid_volume >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "GridVolumeVector_capacity", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridVolumeVector_capacity" "', argument " "1"" of type '" "std::vector< meep::grid_volume > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  {
    try {
      result = ((std::vector< meep::grid_volume > const *)arg1)->capacity();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_GridVolumeVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::grid_volume > *arg1 = (std::vector< meep::grid_volume > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_GridVolumeVector", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GridVolumeVector" "', argument " "1"" of type '" "std::vector< meep::grid_volume > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::grid_volume > * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *GridVolumeVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *GridVolumeVector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_IntVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  PyObject **arg2 = (PyObject **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  arg2 = &obj0;
  if (!PyArg_UnpackTuple(args, "IntVector_iterator", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_iterator" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  {
    try {
      result = (swig::SwigPyIterator *)std_vector_Sl_int_Sg__iterator(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "IntVector___nonzero__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___nonzero__" "', argument " "1"" of type '" "std::vector< int > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  {
    try {
      result = (bool)std_vector_Sl_int_Sg____nonzero__((std::vector< int > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "IntVector___bool__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___bool__" "', argument " "1"" of type '" "std::vector< int > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  {
    try {
      result = (bool)std_vector_Sl_int_Sg____bool__((std::vector< int > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< int >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "IntVector___len__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___len__" "', argument " "1"" of type '" "std::vector< int > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  {
    try {
      result = std_vector_Sl_int_Sg____len__((std::vector< int > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  std::vector< int >::difference_type arg2 ;
  std::vector< int >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< int,std::allocator< int > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "IntVector___getslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___getslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___getslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< int >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector___getslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< int >::difference_type >(val3);
  {
    try {
      try {
        result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg____getslice__(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  std::vector< int >::difference_type arg2 ;
  std::vector< int >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "IntVector___setslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___setslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___setslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< int >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector___setslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< int >::difference_type >(val3);
  {
    try {
      try {
        std_vector_Sl_int_Sg____setslice____SWIG_0(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  std::vector< int >::difference_type arg2 ;
  std::vector< int >::difference_type arg3 ;
  std::vector< int,std::allocator< int > > *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "IntVector___setslice__", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___setslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___setslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< int >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector___setslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< int >::difference_type >(val3);
  {
    std::vector< int,std::allocator< int > > *ptr = (std::vector< int,std::allocator< int > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IntVector___setslice__" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntVector___setslice__" "', argument " "4"" of type '" "std::vector< int,std::allocator< int > > const &""'"); 
    }
    arg4 = ptr;
  }
  {
    try {
      try {
        std_vector_Sl_int_Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< int,std::allocator< int > > const &)*arg4);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector___setslice__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_IntVector___setslice____SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< int,std::allocator< int > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_IntVector___setslice____SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IntVector___setslice__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< int >::__setslice__(std::vector< int >::difference_type,std::vector< int >::difference_type)\n"
    "    std::vector< int >::__setslice__(std::vector< int >::difference_type,std::vector< int >::difference_type,std::vector< int,std::allocator< int > > const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_IntVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  std::vector< int >::difference_type arg2 ;
  std::vector< int >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "IntVector___delslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___delslice__" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___delslice__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< int >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector___delslice__" "', argument " "3"" of type '" "std::vector< int >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< int >::difference_type >(val3);
  {
    try {
      try {
        std_vector_Sl_int_Sg____delslice__(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  std::vector< int >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "IntVector___delitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___delitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___delitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< int >::difference_type >(val2);
  {
    try {
      try {
        std_vector_Sl_int_Sg____delitem____SWIG_0(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< int,std::allocator< int > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "IntVector___getitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___getitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        result = (std::vector< int,std::allocator< int > > *)std_vector_Sl_int_Sg____getitem____SWIG_0(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  std::vector< int,std::allocator< int > > *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "IntVector___setitem__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    std::vector< int,std::allocator< int > > *ptr = (std::vector< int,std::allocator< int > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IntVector___setitem__" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntVector___setitem__" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > > const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      try {
        std_vector_Sl_int_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< int,std::allocator< int > > const &)*arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "IntVector___setitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        std_vector_Sl_int_Sg____setitem____SWIG_1(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "IntVector___delitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___delitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        std_vector_Sl_int_Sg____delitem____SWIG_1(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector___delitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_IntVector___delitem____SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_IntVector___delitem____SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IntVector___delitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< int >::__delitem__(std::vector< int >::difference_type)\n"
    "    std::vector< int >::__delitem__(PySliceObject *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_IntVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  std::vector< int >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< int >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "IntVector___getitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___getitem__" "', argument " "1"" of type '" "std::vector< int > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___getitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< int >::difference_type >(val2);
  {
    try {
      try {
        result = (std::vector< int >::value_type *) &std_vector_Sl_int_Sg____getitem____SWIG_1((std::vector< int > const *)arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(*result));
  (void)swig::container_owner<swig::traits<std::vector< int >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector___getitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_IntVector___getitem____SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_IntVector___getitem____SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IntVector___getitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< int >::__getitem__(PySliceObject *)\n"
    "    std::vector< int >::__getitem__(std::vector< int >::difference_type) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_IntVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  std::vector< int >::difference_type arg2 ;
  std::vector< int >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  std::vector< int >::value_type temp3 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "IntVector___setitem__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector___setitem__" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector___setitem__" "', argument " "2"" of type '" "std::vector< int >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< int >::difference_type >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector___setitem__" "', argument " "3"" of type '" "std::vector< int >::value_type""'");
  } 
  temp3 = static_cast< std::vector< int >::value_type >(val3);
  arg3 = &temp3;
  {
    try {
      try {
        std_vector_Sl_int_Sg____setitem____SWIG_2(arg1,arg2,(int const &)*arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector___setitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_IntVector___setitem____SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< int,std::allocator< int > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_IntVector___setitem____SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_IntVector___setitem____SWIG_2(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IntVector___setitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< int >::__setitem__(PySliceObject *,std::vector< int,std::allocator< int > > const &)\n"
    "    std::vector< int >::__setitem__(PySliceObject *)\n"
    "    std::vector< int >::__setitem__(std::vector< int >::difference_type,std::vector< int >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_IntVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< int >::value_type result;
  
  if (!PyArg_UnpackTuple(args, "IntVector_pop", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_pop" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  {
    try {
      try {
        result = (std::vector< int >::value_type)std_vector_Sl_int_Sg__pop(arg1);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  std::vector< int >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< int >::value_type temp2 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "IntVector_append", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_append" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_append" "', argument " "2"" of type '" "std::vector< int >::value_type""'");
  } 
  temp2 = static_cast< std::vector< int >::value_type >(val2);
  arg2 = &temp2;
  {
    try {
      std_vector_Sl_int_Sg__append(arg1,(int const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_IntVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_IntVector", 0, 0)) SWIG_fail;
  {
    try {
      result = (std::vector< int > *)new std::vector< int >();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_IntVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  std::vector< int > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_IntVector", 1, 1, &obj0)) SWIG_fail;
  {
    std::vector< int,std::allocator< int > > *ptr = (std::vector< int,std::allocator< int > > *)0;
    res1 = swig::asptr(obj0, &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IntVector" "', argument " "1"" of type '" "std::vector< int > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_IntVector" "', argument " "1"" of type '" "std::vector< int > const &""'"); 
    }
    arg1 = ptr;
  }
  {
    try {
      result = (std::vector< int > *)new std::vector< int >((std::vector< int > const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "IntVector_empty", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_empty" "', argument " "1"" of type '" "std::vector< int > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  {
    try {
      result = (bool)((std::vector< int > const *)arg1)->empty();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< int >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "IntVector_size", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_size" "', argument " "1"" of type '" "std::vector< int > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  {
    try {
      result = ((std::vector< int > const *)arg1)->size();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  std::vector< int > *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "IntVector_swap", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_swap" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntVector_swap" "', argument " "2"" of type '" "std::vector< int > &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntVector_swap" "', argument " "2"" of type '" "std::vector< int > &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< int > * >(argp2);
  {
    try {
      (arg1)->swap(*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< int >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "IntVector_begin", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_begin" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  {
    try {
      result = (arg1)->begin();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< int >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "IntVector_end", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_end" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  {
    try {
      result = (arg1)->end();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< int >::reverse_iterator result;
  
  if (!PyArg_UnpackTuple(args, "IntVector_rbegin", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_rbegin" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  {
    try {
      result = (arg1)->rbegin();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< int >::reverse_iterator result;
  
  if (!PyArg_UnpackTuple(args, "IntVector_rend", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_rend" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  {
    try {
      result = (arg1)->rend();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "IntVector_clear", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_clear" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  {
    try {
      (arg1)->clear();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  SwigValueWrapper< std::allocator< int > > result;
  
  if (!PyArg_UnpackTuple(args, "IntVector_get_allocator", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_get_allocator" "', argument " "1"" of type '" "std::vector< int > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  {
    try {
      result = ((std::vector< int > const *)arg1)->get_allocator();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new std::vector< int >::allocator_type(static_cast< const std::vector< int >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_int_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_IntVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int >::size_type arg1 ;
  size_t val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< int > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_IntVector", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IntVector" "', argument " "1"" of type '" "std::vector< int >::size_type""'");
  } 
  arg1 = static_cast< std::vector< int >::size_type >(val1);
  {
    try {
      result = (std::vector< int > *)new std::vector< int >(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "IntVector_pop_back", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_pop_back" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  {
    try {
      (arg1)->pop_back();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  std::vector< int >::size_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "IntVector_resize", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_resize" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_resize" "', argument " "2"" of type '" "std::vector< int >::size_type""'");
  } 
  arg2 = static_cast< std::vector< int >::size_type >(val2);
  {
    try {
      (arg1)->resize(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  std::vector< int >::iterator arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< int >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "IntVector_erase", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_erase" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< int >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
    }
  }
  {
    try {
      result = std_vector_Sl_int_Sg__erase__SWIG_0(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  std::vector< int >::iterator arg2 ;
  std::vector< int >::iterator arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  swig::SwigPyIterator *iter3 = 0 ;
  int res3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< int >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "IntVector_erase", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_erase" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< int >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
    }
  }
  res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res3) || !iter3) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "3"" of type '" "std::vector< int >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< int >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter3);
    if (iter_t) {
      arg3 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_erase" "', argument " "3"" of type '" "std::vector< int >::iterator""'");
    }
  }
  {
    try {
      result = std_vector_Sl_int_Sg__erase__SWIG_1(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector_erase(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter) != 0));
      if (_v) {
        return _wrap_IntVector_erase__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter) != 0));
      if (_v) {
        swig::SwigPyIterator *iter = 0;
        int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
        _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter) != 0));
        if (_v) {
          return _wrap_IntVector_erase__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IntVector_erase'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< int >::erase(std::vector< int >::iterator)\n"
    "    std::vector< int >::erase(std::vector< int >::iterator,std::vector< int >::iterator)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_new_IntVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int >::size_type arg1 ;
  std::vector< int >::value_type *arg2 = 0 ;
  size_t val1 ;
  int ecode1 = 0 ;
  std::vector< int >::value_type temp2 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< int > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_IntVector", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IntVector" "', argument " "1"" of type '" "std::vector< int >::size_type""'");
  } 
  arg1 = static_cast< std::vector< int >::size_type >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IntVector" "', argument " "2"" of type '" "std::vector< int >::value_type""'");
  } 
  temp2 = static_cast< std::vector< int >::value_type >(val2);
  arg2 = &temp2;
  {
    try {
      result = (std::vector< int > *)new std::vector< int >(arg1,(std::vector< int >::value_type const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_IntVector(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_IntVector__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_IntVector__SWIG_2(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_IntVector__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_IntVector__SWIG_3(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_IntVector'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< int >::vector()\n"
    "    std::vector< int >::vector(std::vector< int > const &)\n"
    "    std::vector< int >::vector(std::vector< int >::size_type)\n"
    "    std::vector< int >::vector(std::vector< int >::size_type,std::vector< int >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_IntVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  std::vector< int >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< int >::value_type temp2 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "IntVector_push_back", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_push_back" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_push_back" "', argument " "2"" of type '" "std::vector< int >::value_type""'");
  } 
  temp2 = static_cast< std::vector< int >::value_type >(val2);
  arg2 = &temp2;
  {
    try {
      (arg1)->push_back((std::vector< int >::value_type const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< int >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "IntVector_front", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_front" "', argument " "1"" of type '" "std::vector< int > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  {
    try {
      result = (std::vector< int >::value_type *) &((std::vector< int > const *)arg1)->front();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(*result));
  (void)swig::container_owner<swig::traits<std::vector< int >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< int >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "IntVector_back", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_back" "', argument " "1"" of type '" "std::vector< int > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  {
    try {
      result = (std::vector< int >::value_type *) &((std::vector< int > const *)arg1)->back();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(*result));
  (void)swig::container_owner<swig::traits<std::vector< int >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  std::vector< int >::size_type arg2 ;
  std::vector< int >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  std::vector< int >::value_type temp3 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "IntVector_assign", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_assign" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_assign" "', argument " "2"" of type '" "std::vector< int >::size_type""'");
  } 
  arg2 = static_cast< std::vector< int >::size_type >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector_assign" "', argument " "3"" of type '" "std::vector< int >::value_type""'");
  } 
  temp3 = static_cast< std::vector< int >::value_type >(val3);
  arg3 = &temp3;
  {
    try {
      (arg1)->assign(arg2,(std::vector< int >::value_type const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  std::vector< int >::size_type arg2 ;
  std::vector< int >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  std::vector< int >::value_type temp3 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "IntVector_resize", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_resize" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_resize" "', argument " "2"" of type '" "std::vector< int >::size_type""'");
  } 
  arg2 = static_cast< std::vector< int >::size_type >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector_resize" "', argument " "3"" of type '" "std::vector< int >::value_type""'");
  } 
  temp3 = static_cast< std::vector< int >::value_type >(val3);
  arg3 = &temp3;
  {
    try {
      (arg1)->resize(arg2,(std::vector< int >::value_type const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector_resize(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_IntVector_resize__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_IntVector_resize__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IntVector_resize'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< int >::resize(std::vector< int >::size_type)\n"
    "    std::vector< int >::resize(std::vector< int >::size_type,std::vector< int >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_IntVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  std::vector< int >::iterator arg2 ;
  std::vector< int >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  std::vector< int >::value_type temp3 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< int >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "IntVector_insert", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_insert" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< int >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
    }
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector_insert" "', argument " "3"" of type '" "std::vector< int >::value_type""'");
  } 
  temp3 = static_cast< std::vector< int >::value_type >(val3);
  arg3 = &temp3;
  {
    try {
      result = std_vector_Sl_int_Sg__insert__SWIG_0(arg1,arg2,(int const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< int >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  std::vector< int >::iterator arg2 ;
  std::vector< int >::size_type arg3 ;
  std::vector< int >::value_type *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  size_t val3 ;
  int ecode3 = 0 ;
  std::vector< int >::value_type temp4 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "IntVector_insert", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_insert" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< int >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "IntVector_insert" "', argument " "2"" of type '" "std::vector< int >::iterator""'");
    }
  }
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IntVector_insert" "', argument " "3"" of type '" "std::vector< int >::size_type""'");
  } 
  arg3 = static_cast< std::vector< int >::size_type >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IntVector_insert" "', argument " "4"" of type '" "std::vector< int >::value_type""'");
  } 
  temp4 = static_cast< std::vector< int >::value_type >(val4);
  arg4 = &temp4;
  {
    try {
      std_vector_Sl_int_Sg__insert__SWIG_1(arg1,arg2,arg3,(int const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector_insert(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter) != 0));
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_IntVector_insert__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< int,std::allocator< int > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< int >::iterator > *>(iter) != 0));
      if (_v) {
        {
          int res = SWIG_AsVal_size_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_IntVector_insert__SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'IntVector_insert'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< int >::insert(std::vector< int >::iterator,std::vector< int >::value_type const &)\n"
    "    std::vector< int >::insert(std::vector< int >::iterator,std::vector< int >::size_type,std::vector< int >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_IntVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  std::vector< int >::size_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "IntVector_reserve", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_reserve" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_reserve" "', argument " "2"" of type '" "std::vector< int >::size_type""'");
  } 
  arg2 = static_cast< std::vector< int >::size_type >(val2);
  {
    try {
      (arg1)->reserve(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_IntVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< int >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "IntVector_capacity", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_capacity" "', argument " "1"" of type '" "std::vector< int > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  {
    try {
      result = ((std::vector< int > const *)arg1)->capacity();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_IntVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< int > *arg1 = (std::vector< int > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_IntVector", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IntVector" "', argument " "1"" of type '" "std::vector< int > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< int > * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *IntVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *IntVector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_Size_t_Vector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  PyObject **arg2 = (PyObject **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  arg2 = &obj0;
  if (!PyArg_UnpackTuple(args, "Size_t_Vector_iterator", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector_iterator" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  {
    try {
      result = (swig::SwigPyIterator *)std_vector_Sl_size_t_Sg__iterator(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector___nonzero__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector___nonzero__" "', argument " "1"" of type '" "std::vector< size_t > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  {
    try {
      result = (bool)std_vector_Sl_size_t_Sg____nonzero__((std::vector< size_t > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector___bool__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector___bool__" "', argument " "1"" of type '" "std::vector< size_t > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  {
    try {
      result = (bool)std_vector_Sl_size_t_Sg____bool__((std::vector< size_t > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< size_t >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector___len__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector___len__" "', argument " "1"" of type '" "std::vector< size_t > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  {
    try {
      result = std_vector_Sl_size_t_Sg____len__((std::vector< size_t > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  std::vector< size_t >::difference_type arg2 ;
  std::vector< size_t >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< size_t,std::allocator< size_t > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector___getslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector___getslice__" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Size_t_Vector___getslice__" "', argument " "2"" of type '" "std::vector< size_t >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< size_t >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Size_t_Vector___getslice__" "', argument " "3"" of type '" "std::vector< size_t >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< size_t >::difference_type >(val3);
  {
    try {
      try {
        result = (std::vector< size_t,std::allocator< size_t > > *)std_vector_Sl_size_t_Sg____getslice__(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  std::vector< size_t >::difference_type arg2 ;
  std::vector< size_t >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector___setslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector___setslice__" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Size_t_Vector___setslice__" "', argument " "2"" of type '" "std::vector< size_t >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< size_t >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Size_t_Vector___setslice__" "', argument " "3"" of type '" "std::vector< size_t >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< size_t >::difference_type >(val3);
  {
    try {
      try {
        std_vector_Sl_size_t_Sg____setslice____SWIG_0(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  std::vector< size_t >::difference_type arg2 ;
  std::vector< size_t >::difference_type arg3 ;
  std::vector< size_t,std::allocator< size_t > > *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector___setslice__", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector___setslice__" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Size_t_Vector___setslice__" "', argument " "2"" of type '" "std::vector< size_t >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< size_t >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Size_t_Vector___setslice__" "', argument " "3"" of type '" "std::vector< size_t >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< size_t >::difference_type >(val3);
  {
    std::vector< size_t,std::allocator< size_t > > *ptr = (std::vector< size_t,std::allocator< size_t > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Size_t_Vector___setslice__" "', argument " "4"" of type '" "std::vector< size_t,std::allocator< size_t > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Size_t_Vector___setslice__" "', argument " "4"" of type '" "std::vector< size_t,std::allocator< size_t > > const &""'"); 
    }
    arg4 = ptr;
  }
  {
    try {
      try {
        std_vector_Sl_size_t_Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< size_t,std::allocator< size_t > > const &)*arg4);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector___setslice__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_Size_t_Vector___setslice____SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< size_t,std::allocator< size_t > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_Size_t_Vector___setslice____SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Size_t_Vector___setslice__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< size_t >::__setslice__(std::vector< size_t >::difference_type,std::vector< size_t >::difference_type)\n"
    "    std::vector< size_t >::__setslice__(std::vector< size_t >::difference_type,std::vector< size_t >::difference_type,std::vector< size_t,std::allocator< size_t > > const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  std::vector< size_t >::difference_type arg2 ;
  std::vector< size_t >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector___delslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector___delslice__" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Size_t_Vector___delslice__" "', argument " "2"" of type '" "std::vector< size_t >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< size_t >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Size_t_Vector___delslice__" "', argument " "3"" of type '" "std::vector< size_t >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< size_t >::difference_type >(val3);
  {
    try {
      try {
        std_vector_Sl_size_t_Sg____delslice__(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  std::vector< size_t >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector___delitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector___delitem__" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Size_t_Vector___delitem__" "', argument " "2"" of type '" "std::vector< size_t >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< size_t >::difference_type >(val2);
  {
    try {
      try {
        std_vector_Sl_size_t_Sg____delitem____SWIG_0(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< size_t,std::allocator< size_t > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector___getitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector___getitem__" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "Size_t_Vector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        result = (std::vector< size_t,std::allocator< size_t > > *)std_vector_Sl_size_t_Sg____getitem____SWIG_0(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  std::vector< size_t,std::allocator< size_t > > *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector___setitem__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector___setitem__" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "Size_t_Vector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    std::vector< size_t,std::allocator< size_t > > *ptr = (std::vector< size_t,std::allocator< size_t > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Size_t_Vector___setitem__" "', argument " "3"" of type '" "std::vector< size_t,std::allocator< size_t > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Size_t_Vector___setitem__" "', argument " "3"" of type '" "std::vector< size_t,std::allocator< size_t > > const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      try {
        std_vector_Sl_size_t_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< size_t,std::allocator< size_t > > const &)*arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector___setitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector___setitem__" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "Size_t_Vector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        std_vector_Sl_size_t_Sg____setitem____SWIG_1(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector___delitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector___delitem__" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "Size_t_Vector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        std_vector_Sl_size_t_Sg____delitem____SWIG_1(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector___delitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_Size_t_Vector___delitem____SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Size_t_Vector___delitem____SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Size_t_Vector___delitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< size_t >::__delitem__(std::vector< size_t >::difference_type)\n"
    "    std::vector< size_t >::__delitem__(PySliceObject *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  std::vector< size_t >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< size_t >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector___getitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector___getitem__" "', argument " "1"" of type '" "std::vector< size_t > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Size_t_Vector___getitem__" "', argument " "2"" of type '" "std::vector< size_t >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< size_t >::difference_type >(val2);
  {
    try {
      try {
        result = (std::vector< size_t >::value_type *) &std_vector_Sl_size_t_Sg____getitem____SWIG_1((std::vector< size_t > const *)arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(*result));
  (void)swig::container_owner<swig::traits<std::vector< size_t >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector___getitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_Size_t_Vector___getitem____SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Size_t_Vector___getitem____SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Size_t_Vector___getitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< size_t >::__getitem__(PySliceObject *)\n"
    "    std::vector< size_t >::__getitem__(std::vector< size_t >::difference_type) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  std::vector< size_t >::difference_type arg2 ;
  std::vector< size_t >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  std::vector< size_t >::value_type temp3 ;
  size_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector___setitem__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector___setitem__" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Size_t_Vector___setitem__" "', argument " "2"" of type '" "std::vector< size_t >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< size_t >::difference_type >(val2);
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Size_t_Vector___setitem__" "', argument " "3"" of type '" "std::vector< size_t >::value_type""'");
  } 
  temp3 = static_cast< std::vector< size_t >::value_type >(val3);
  arg3 = &temp3;
  {
    try {
      try {
        std_vector_Sl_size_t_Sg____setitem____SWIG_2(arg1,arg2,(size_t const &)*arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector___setitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_Size_t_Vector___setitem____SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< size_t,std::allocator< size_t > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_Size_t_Vector___setitem____SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_size_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_Size_t_Vector___setitem____SWIG_2(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Size_t_Vector___setitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< size_t >::__setitem__(PySliceObject *,std::vector< size_t,std::allocator< size_t > > const &)\n"
    "    std::vector< size_t >::__setitem__(PySliceObject *)\n"
    "    std::vector< size_t >::__setitem__(std::vector< size_t >::difference_type,std::vector< size_t >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< size_t >::value_type result;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector_pop", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector_pop" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  {
    try {
      try {
        result = std_vector_Sl_size_t_Sg__pop(arg1);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  std::vector< size_t >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< size_t >::value_type temp2 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector_append", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector_append" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Size_t_Vector_append" "', argument " "2"" of type '" "std::vector< size_t >::value_type""'");
  } 
  temp2 = static_cast< std::vector< size_t >::value_type >(val2);
  arg2 = &temp2;
  {
    try {
      std_vector_Sl_size_t_Sg__append(arg1,(size_t const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Size_t_Vector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_Size_t_Vector", 0, 0)) SWIG_fail;
  {
    try {
      result = (std::vector< size_t > *)new std::vector< size_t >();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Size_t_Vector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  std::vector< size_t > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_Size_t_Vector", 1, 1, &obj0)) SWIG_fail;
  {
    std::vector< size_t,std::allocator< size_t > > *ptr = (std::vector< size_t,std::allocator< size_t > > *)0;
    res1 = swig::asptr(obj0, &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Size_t_Vector" "', argument " "1"" of type '" "std::vector< size_t > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Size_t_Vector" "', argument " "1"" of type '" "std::vector< size_t > const &""'"); 
    }
    arg1 = ptr;
  }
  {
    try {
      result = (std::vector< size_t > *)new std::vector< size_t >((std::vector< size_t > const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector_empty", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector_empty" "', argument " "1"" of type '" "std::vector< size_t > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  {
    try {
      result = (bool)((std::vector< size_t > const *)arg1)->empty();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< size_t >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector_size", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector_size" "', argument " "1"" of type '" "std::vector< size_t > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  {
    try {
      result = ((std::vector< size_t > const *)arg1)->size();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  std::vector< size_t > *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector_swap", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector_swap" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Size_t_Vector_swap" "', argument " "2"" of type '" "std::vector< size_t > &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Size_t_Vector_swap" "', argument " "2"" of type '" "std::vector< size_t > &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< size_t > * >(argp2);
  {
    try {
      (arg1)->swap(*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< size_t >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector_begin", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector_begin" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  {
    try {
      result = (arg1)->begin();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< size_t >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< size_t >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector_end", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector_end" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  {
    try {
      result = (arg1)->end();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< size_t >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< size_t >::reverse_iterator result;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector_rbegin", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector_rbegin" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  {
    try {
      result = (arg1)->rbegin();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< size_t >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< size_t >::reverse_iterator result;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector_rend", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector_rend" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  {
    try {
      result = (arg1)->rend();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< size_t >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector_clear", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector_clear" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  {
    try {
      (arg1)->clear();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  SwigValueWrapper< std::allocator< size_t > > result;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector_get_allocator", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector_get_allocator" "', argument " "1"" of type '" "std::vector< size_t > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  {
    try {
      result = ((std::vector< size_t > const *)arg1)->get_allocator();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new std::vector< size_t >::allocator_type(static_cast< const std::vector< size_t >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_size_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Size_t_Vector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t >::size_type arg1 ;
  size_t val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< size_t > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_Size_t_Vector", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Size_t_Vector" "', argument " "1"" of type '" "std::vector< size_t >::size_type""'");
  } 
  arg1 = static_cast< std::vector< size_t >::size_type >(val1);
  {
    try {
      result = (std::vector< size_t > *)new std::vector< size_t >(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector_pop_back", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector_pop_back" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  {
    try {
      (arg1)->pop_back();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  std::vector< size_t >::size_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector_resize", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector_resize" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Size_t_Vector_resize" "', argument " "2"" of type '" "std::vector< size_t >::size_type""'");
  } 
  arg2 = static_cast< std::vector< size_t >::size_type >(val2);
  {
    try {
      (arg1)->resize(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  std::vector< size_t >::iterator arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< size_t >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector_erase", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector_erase" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "Size_t_Vector_erase" "', argument " "2"" of type '" "std::vector< size_t >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< size_t >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< size_t >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "Size_t_Vector_erase" "', argument " "2"" of type '" "std::vector< size_t >::iterator""'");
    }
  }
  {
    try {
      result = std_vector_Sl_size_t_Sg__erase__SWIG_0(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< size_t >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  std::vector< size_t >::iterator arg2 ;
  std::vector< size_t >::iterator arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  swig::SwigPyIterator *iter3 = 0 ;
  int res3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< size_t >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector_erase", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector_erase" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "Size_t_Vector_erase" "', argument " "2"" of type '" "std::vector< size_t >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< size_t >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< size_t >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "Size_t_Vector_erase" "', argument " "2"" of type '" "std::vector< size_t >::iterator""'");
    }
  }
  res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res3) || !iter3) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "Size_t_Vector_erase" "', argument " "3"" of type '" "std::vector< size_t >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< size_t >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< size_t >::iterator > *>(iter3);
    if (iter_t) {
      arg3 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "Size_t_Vector_erase" "', argument " "3"" of type '" "std::vector< size_t >::iterator""'");
    }
  }
  {
    try {
      result = std_vector_Sl_size_t_Sg__erase__SWIG_1(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< size_t >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_erase(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< size_t >::iterator > *>(iter) != 0));
      if (_v) {
        return _wrap_Size_t_Vector_erase__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< size_t >::iterator > *>(iter) != 0));
      if (_v) {
        swig::SwigPyIterator *iter = 0;
        int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
        _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< size_t >::iterator > *>(iter) != 0));
        if (_v) {
          return _wrap_Size_t_Vector_erase__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Size_t_Vector_erase'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< size_t >::erase(std::vector< size_t >::iterator)\n"
    "    std::vector< size_t >::erase(std::vector< size_t >::iterator,std::vector< size_t >::iterator)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_new_Size_t_Vector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t >::size_type arg1 ;
  std::vector< size_t >::value_type *arg2 = 0 ;
  size_t val1 ;
  int ecode1 = 0 ;
  std::vector< size_t >::value_type temp2 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< size_t > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_Size_t_Vector", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Size_t_Vector" "', argument " "1"" of type '" "std::vector< size_t >::size_type""'");
  } 
  arg1 = static_cast< std::vector< size_t >::size_type >(val1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Size_t_Vector" "', argument " "2"" of type '" "std::vector< size_t >::value_type""'");
  } 
  temp2 = static_cast< std::vector< size_t >::value_type >(val2);
  arg2 = &temp2;
  {
    try {
      result = (std::vector< size_t > *)new std::vector< size_t >(arg1,(std::vector< size_t >::value_type const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Size_t_Vector(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_Size_t_Vector__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_Size_t_Vector__SWIG_2(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_Size_t_Vector__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_Size_t_Vector__SWIG_3(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_Size_t_Vector'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< size_t >::vector()\n"
    "    std::vector< size_t >::vector(std::vector< size_t > const &)\n"
    "    std::vector< size_t >::vector(std::vector< size_t >::size_type)\n"
    "    std::vector< size_t >::vector(std::vector< size_t >::size_type,std::vector< size_t >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  std::vector< size_t >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< size_t >::value_type temp2 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector_push_back", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector_push_back" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Size_t_Vector_push_back" "', argument " "2"" of type '" "std::vector< size_t >::value_type""'");
  } 
  temp2 = static_cast< std::vector< size_t >::value_type >(val2);
  arg2 = &temp2;
  {
    try {
      (arg1)->push_back((std::vector< size_t >::value_type const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< size_t >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector_front", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector_front" "', argument " "1"" of type '" "std::vector< size_t > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  {
    try {
      result = (std::vector< size_t >::value_type *) &((std::vector< size_t > const *)arg1)->front();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(*result));
  (void)swig::container_owner<swig::traits<std::vector< size_t >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< size_t >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector_back", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector_back" "', argument " "1"" of type '" "std::vector< size_t > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  {
    try {
      result = (std::vector< size_t >::value_type *) &((std::vector< size_t > const *)arg1)->back();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(*result));
  (void)swig::container_owner<swig::traits<std::vector< size_t >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  std::vector< size_t >::size_type arg2 ;
  std::vector< size_t >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  std::vector< size_t >::value_type temp3 ;
  size_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector_assign", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector_assign" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Size_t_Vector_assign" "', argument " "2"" of type '" "std::vector< size_t >::size_type""'");
  } 
  arg2 = static_cast< std::vector< size_t >::size_type >(val2);
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Size_t_Vector_assign" "', argument " "3"" of type '" "std::vector< size_t >::value_type""'");
  } 
  temp3 = static_cast< std::vector< size_t >::value_type >(val3);
  arg3 = &temp3;
  {
    try {
      (arg1)->assign(arg2,(std::vector< size_t >::value_type const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  std::vector< size_t >::size_type arg2 ;
  std::vector< size_t >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  std::vector< size_t >::value_type temp3 ;
  size_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector_resize", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector_resize" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Size_t_Vector_resize" "', argument " "2"" of type '" "std::vector< size_t >::size_type""'");
  } 
  arg2 = static_cast< std::vector< size_t >::size_type >(val2);
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Size_t_Vector_resize" "', argument " "3"" of type '" "std::vector< size_t >::value_type""'");
  } 
  temp3 = static_cast< std::vector< size_t >::value_type >(val3);
  arg3 = &temp3;
  {
    try {
      (arg1)->resize(arg2,(std::vector< size_t >::value_type const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_resize(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Size_t_Vector_resize__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_size_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_Size_t_Vector_resize__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Size_t_Vector_resize'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< size_t >::resize(std::vector< size_t >::size_type)\n"
    "    std::vector< size_t >::resize(std::vector< size_t >::size_type,std::vector< size_t >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  std::vector< size_t >::iterator arg2 ;
  std::vector< size_t >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  std::vector< size_t >::value_type temp3 ;
  size_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< size_t >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector_insert", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector_insert" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "Size_t_Vector_insert" "', argument " "2"" of type '" "std::vector< size_t >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< size_t >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< size_t >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "Size_t_Vector_insert" "', argument " "2"" of type '" "std::vector< size_t >::iterator""'");
    }
  }
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Size_t_Vector_insert" "', argument " "3"" of type '" "std::vector< size_t >::value_type""'");
  } 
  temp3 = static_cast< std::vector< size_t >::value_type >(val3);
  arg3 = &temp3;
  {
    try {
      result = std_vector_Sl_size_t_Sg__insert__SWIG_0(arg1,arg2,(size_t const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< size_t >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  std::vector< size_t >::iterator arg2 ;
  std::vector< size_t >::size_type arg3 ;
  std::vector< size_t >::value_type *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  size_t val3 ;
  int ecode3 = 0 ;
  std::vector< size_t >::value_type temp4 ;
  size_t val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector_insert", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector_insert" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "Size_t_Vector_insert" "', argument " "2"" of type '" "std::vector< size_t >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< size_t >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< size_t >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "Size_t_Vector_insert" "', argument " "2"" of type '" "std::vector< size_t >::iterator""'");
    }
  }
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Size_t_Vector_insert" "', argument " "3"" of type '" "std::vector< size_t >::size_type""'");
  } 
  arg3 = static_cast< std::vector< size_t >::size_type >(val3);
  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Size_t_Vector_insert" "', argument " "4"" of type '" "std::vector< size_t >::value_type""'");
  } 
  temp4 = static_cast< std::vector< size_t >::value_type >(val4);
  arg4 = &temp4;
  {
    try {
      std_vector_Sl_size_t_Sg__insert__SWIG_1(arg1,arg2,arg3,(size_t const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_insert(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< size_t >::iterator > *>(iter) != 0));
      if (_v) {
        {
          int res = SWIG_AsVal_size_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_Size_t_Vector_insert__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< size_t,std::allocator< size_t > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< size_t >::iterator > *>(iter) != 0));
      if (_v) {
        {
          int res = SWIG_AsVal_size_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_size_t(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_Size_t_Vector_insert__SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Size_t_Vector_insert'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< size_t >::insert(std::vector< size_t >::iterator,std::vector< size_t >::value_type const &)\n"
    "    std::vector< size_t >::insert(std::vector< size_t >::iterator,std::vector< size_t >::size_type,std::vector< size_t >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  std::vector< size_t >::size_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector_reserve", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector_reserve" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Size_t_Vector_reserve" "', argument " "2"" of type '" "std::vector< size_t >::size_type""'");
  } 
  arg2 = static_cast< std::vector< size_t >::size_type >(val2);
  {
    try {
      (arg1)->reserve(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Size_t_Vector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< size_t >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "Size_t_Vector_capacity", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Size_t_Vector_capacity" "', argument " "1"" of type '" "std::vector< size_t > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  {
    try {
      result = ((std::vector< size_t > const *)arg1)->capacity();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_Size_t_Vector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< size_t > *arg1 = (std::vector< size_t > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_Size_t_Vector", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Size_t_Vector" "', argument " "1"" of type '" "std::vector< size_t > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< size_t > * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *Size_t_Vector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_size_t_std__allocatorT_size_t_t_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *Size_t_Vector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_DoubleVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  PyObject **arg2 = (PyObject **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  arg2 = &obj0;
  if (!PyArg_UnpackTuple(args, "DoubleVector_iterator", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_iterator" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  {
    try {
      result = (swig::SwigPyIterator *)std_vector_Sl_double_Sg__iterator(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector___nonzero__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___nonzero__" "', argument " "1"" of type '" "std::vector< double > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  {
    try {
      result = (bool)std_vector_Sl_double_Sg____nonzero__((std::vector< double > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector___bool__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___bool__" "', argument " "1"" of type '" "std::vector< double > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  {
    try {
      result = (bool)std_vector_Sl_double_Sg____bool__((std::vector< double > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< double >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector___len__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___len__" "', argument " "1"" of type '" "std::vector< double > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  {
    try {
      result = std_vector_Sl_double_Sg____len__((std::vector< double > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  std::vector< double >::difference_type arg2 ;
  std::vector< double >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< double,std::allocator< double > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector___getslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___getslice__" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___getslice__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< double >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector___getslice__" "', argument " "3"" of type '" "std::vector< double >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< double >::difference_type >(val3);
  {
    try {
      try {
        result = (std::vector< double,std::allocator< double > > *)std_vector_Sl_double_Sg____getslice__(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  std::vector< double >::difference_type arg2 ;
  std::vector< double >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector___setslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___setslice__" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___setslice__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< double >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector___setslice__" "', argument " "3"" of type '" "std::vector< double >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< double >::difference_type >(val3);
  {
    try {
      try {
        std_vector_Sl_double_Sg____setslice____SWIG_0(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  std::vector< double >::difference_type arg2 ;
  std::vector< double >::difference_type arg3 ;
  std::vector< double,std::allocator< double > > *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector___setslice__", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___setslice__" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___setslice__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< double >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector___setslice__" "', argument " "3"" of type '" "std::vector< double >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< double >::difference_type >(val3);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DoubleVector___setslice__" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleVector___setslice__" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg4 = ptr;
  }
  {
    try {
      try {
        std_vector_Sl_double_Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< double,std::allocator< double > > const &)*arg4);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector___setslice__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_DoubleVector___setslice____SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_DoubleVector___setslice____SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DoubleVector___setslice__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< double >::__setslice__(std::vector< double >::difference_type,std::vector< double >::difference_type)\n"
    "    std::vector< double >::__setslice__(std::vector< double >::difference_type,std::vector< double >::difference_type,std::vector< double,std::allocator< double > > const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_DoubleVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  std::vector< double >::difference_type arg2 ;
  std::vector< double >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector___delslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___delslice__" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___delslice__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< double >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector___delslice__" "', argument " "3"" of type '" "std::vector< double >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< double >::difference_type >(val3);
  {
    try {
      try {
        std_vector_Sl_double_Sg____delslice__(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  std::vector< double >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector___delitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___delitem__" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___delitem__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< double >::difference_type >(val2);
  {
    try {
      try {
        std_vector_Sl_double_Sg____delitem____SWIG_0(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< double,std::allocator< double > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector___getitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___getitem__" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        result = (std::vector< double,std::allocator< double > > *)std_vector_Sl_double_Sg____getitem____SWIG_0(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  std::vector< double,std::allocator< double > > *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector___setitem__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___setitem__" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DoubleVector___setitem__" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleVector___setitem__" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      try {
        std_vector_Sl_double_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< double,std::allocator< double > > const &)*arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector___setitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___setitem__" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        std_vector_Sl_double_Sg____setitem____SWIG_1(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector___delitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___delitem__" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        std_vector_Sl_double_Sg____delitem____SWIG_1(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector___delitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_DoubleVector___delitem____SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_DoubleVector___delitem____SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DoubleVector___delitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< double >::__delitem__(std::vector< double >::difference_type)\n"
    "    std::vector< double >::__delitem__(PySliceObject *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_DoubleVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  std::vector< double >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< double >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector___getitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___getitem__" "', argument " "1"" of type '" "std::vector< double > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___getitem__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< double >::difference_type >(val2);
  {
    try {
      try {
        result = (std::vector< double >::value_type *) &std_vector_Sl_double_Sg____getitem____SWIG_1((std::vector< double > const *)arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(*result));
  (void)swig::container_owner<swig::traits<std::vector< double >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector___getitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_DoubleVector___getitem____SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_DoubleVector___getitem____SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DoubleVector___getitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< double >::__getitem__(PySliceObject *)\n"
    "    std::vector< double >::__getitem__(std::vector< double >::difference_type) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_DoubleVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  std::vector< double >::difference_type arg2 ;
  std::vector< double >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  std::vector< double >::value_type temp3 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector___setitem__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector___setitem__" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector___setitem__" "', argument " "2"" of type '" "std::vector< double >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< double >::difference_type >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector___setitem__" "', argument " "3"" of type '" "std::vector< double >::value_type""'");
  } 
  temp3 = static_cast< std::vector< double >::value_type >(val3);
  arg3 = &temp3;
  {
    try {
      try {
        std_vector_Sl_double_Sg____setitem____SWIG_2(arg1,arg2,(double const &)*arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector___setitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_DoubleVector___setitem____SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< double,std::allocator< double > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_DoubleVector___setitem____SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_DoubleVector___setitem____SWIG_2(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DoubleVector___setitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< double >::__setitem__(PySliceObject *,std::vector< double,std::allocator< double > > const &)\n"
    "    std::vector< double >::__setitem__(PySliceObject *)\n"
    "    std::vector< double >::__setitem__(std::vector< double >::difference_type,std::vector< double >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_DoubleVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< double >::value_type result;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector_pop", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_pop" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  {
    try {
      try {
        result = (std::vector< double >::value_type)std_vector_Sl_double_Sg__pop(arg1);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  std::vector< double >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< double >::value_type temp2 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector_append", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_append" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_append" "', argument " "2"" of type '" "std::vector< double >::value_type""'");
  } 
  temp2 = static_cast< std::vector< double >::value_type >(val2);
  arg2 = &temp2;
  {
    try {
      std_vector_Sl_double_Sg__append(arg1,(double const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DoubleVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_DoubleVector", 0, 0)) SWIG_fail;
  {
    try {
      result = (std::vector< double > *)new std::vector< double >();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DoubleVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  std::vector< double > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_DoubleVector", 1, 1, &obj0)) SWIG_fail;
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res1 = swig::asptr(obj0, &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DoubleVector" "', argument " "1"" of type '" "std::vector< double > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DoubleVector" "', argument " "1"" of type '" "std::vector< double > const &""'"); 
    }
    arg1 = ptr;
  }
  {
    try {
      result = (std::vector< double > *)new std::vector< double >((std::vector< double > const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector_empty", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_empty" "', argument " "1"" of type '" "std::vector< double > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  {
    try {
      result = (bool)((std::vector< double > const *)arg1)->empty();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< double >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector_size", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_size" "', argument " "1"" of type '" "std::vector< double > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  {
    try {
      result = ((std::vector< double > const *)arg1)->size();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  std::vector< double > *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector_swap", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_swap" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DoubleVector_swap" "', argument " "2"" of type '" "std::vector< double > &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleVector_swap" "', argument " "2"" of type '" "std::vector< double > &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< double > * >(argp2);
  {
    try {
      (arg1)->swap(*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< double >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector_begin", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_begin" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  {
    try {
      result = (arg1)->begin();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< double >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector_end", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_end" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  {
    try {
      result = (arg1)->end();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< double >::reverse_iterator result;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector_rbegin", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_rbegin" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  {
    try {
      result = (arg1)->rbegin();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< double >::reverse_iterator result;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector_rend", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_rend" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  {
    try {
      result = (arg1)->rend();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector_clear", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_clear" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  {
    try {
      (arg1)->clear();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  SwigValueWrapper< std::allocator< double > > result;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector_get_allocator", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_get_allocator" "', argument " "1"" of type '" "std::vector< double > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  {
    try {
      result = ((std::vector< double > const *)arg1)->get_allocator();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new std::vector< double >::allocator_type(static_cast< const std::vector< double >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_double_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DoubleVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double >::size_type arg1 ;
  size_t val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< double > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_DoubleVector", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DoubleVector" "', argument " "1"" of type '" "std::vector< double >::size_type""'");
  } 
  arg1 = static_cast< std::vector< double >::size_type >(val1);
  {
    try {
      result = (std::vector< double > *)new std::vector< double >(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector_pop_back", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_pop_back" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  {
    try {
      (arg1)->pop_back();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  std::vector< double >::size_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector_resize", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_resize" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_resize" "', argument " "2"" of type '" "std::vector< double >::size_type""'");
  } 
  arg2 = static_cast< std::vector< double >::size_type >(val2);
  {
    try {
      (arg1)->resize(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  std::vector< double >::iterator arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< double >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector_erase", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_erase" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "2"" of type '" "std::vector< double >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< double >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "2"" of type '" "std::vector< double >::iterator""'");
    }
  }
  {
    try {
      result = std_vector_Sl_double_Sg__erase__SWIG_0(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  std::vector< double >::iterator arg2 ;
  std::vector< double >::iterator arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  swig::SwigPyIterator *iter3 = 0 ;
  int res3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< double >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector_erase", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_erase" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "2"" of type '" "std::vector< double >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< double >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "2"" of type '" "std::vector< double >::iterator""'");
    }
  }
  res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res3) || !iter3) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "3"" of type '" "std::vector< double >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< double >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter3);
    if (iter_t) {
      arg3 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_erase" "', argument " "3"" of type '" "std::vector< double >::iterator""'");
    }
  }
  {
    try {
      result = std_vector_Sl_double_Sg__erase__SWIG_1(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector_erase(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter) != 0));
      if (_v) {
        return _wrap_DoubleVector_erase__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter) != 0));
      if (_v) {
        swig::SwigPyIterator *iter = 0;
        int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
        _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter) != 0));
        if (_v) {
          return _wrap_DoubleVector_erase__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DoubleVector_erase'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< double >::erase(std::vector< double >::iterator)\n"
    "    std::vector< double >::erase(std::vector< double >::iterator,std::vector< double >::iterator)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_new_DoubleVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double >::size_type arg1 ;
  std::vector< double >::value_type *arg2 = 0 ;
  size_t val1 ;
  int ecode1 = 0 ;
  std::vector< double >::value_type temp2 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< double > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_DoubleVector", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DoubleVector" "', argument " "1"" of type '" "std::vector< double >::size_type""'");
  } 
  arg1 = static_cast< std::vector< double >::size_type >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DoubleVector" "', argument " "2"" of type '" "std::vector< double >::value_type""'");
  } 
  temp2 = static_cast< std::vector< double >::value_type >(val2);
  arg2 = &temp2;
  {
    try {
      result = (std::vector< double > *)new std::vector< double >(arg1,(std::vector< double >::value_type const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DoubleVector(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_DoubleVector__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_DoubleVector__SWIG_2(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_DoubleVector__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_DoubleVector__SWIG_3(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_DoubleVector'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< double >::vector()\n"
    "    std::vector< double >::vector(std::vector< double > const &)\n"
    "    std::vector< double >::vector(std::vector< double >::size_type)\n"
    "    std::vector< double >::vector(std::vector< double >::size_type,std::vector< double >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_DoubleVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  std::vector< double >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< double >::value_type temp2 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector_push_back", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_push_back" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_push_back" "', argument " "2"" of type '" "std::vector< double >::value_type""'");
  } 
  temp2 = static_cast< std::vector< double >::value_type >(val2);
  arg2 = &temp2;
  {
    try {
      (arg1)->push_back((std::vector< double >::value_type const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< double >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector_front", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_front" "', argument " "1"" of type '" "std::vector< double > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  {
    try {
      result = (std::vector< double >::value_type *) &((std::vector< double > const *)arg1)->front();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(*result));
  (void)swig::container_owner<swig::traits<std::vector< double >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< double >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector_back", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_back" "', argument " "1"" of type '" "std::vector< double > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  {
    try {
      result = (std::vector< double >::value_type *) &((std::vector< double > const *)arg1)->back();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(*result));
  (void)swig::container_owner<swig::traits<std::vector< double >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  std::vector< double >::size_type arg2 ;
  std::vector< double >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  std::vector< double >::value_type temp3 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector_assign", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_assign" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_assign" "', argument " "2"" of type '" "std::vector< double >::size_type""'");
  } 
  arg2 = static_cast< std::vector< double >::size_type >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector_assign" "', argument " "3"" of type '" "std::vector< double >::value_type""'");
  } 
  temp3 = static_cast< std::vector< double >::value_type >(val3);
  arg3 = &temp3;
  {
    try {
      (arg1)->assign(arg2,(std::vector< double >::value_type const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  std::vector< double >::size_type arg2 ;
  std::vector< double >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  std::vector< double >::value_type temp3 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector_resize", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_resize" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_resize" "', argument " "2"" of type '" "std::vector< double >::size_type""'");
  } 
  arg2 = static_cast< std::vector< double >::size_type >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector_resize" "', argument " "3"" of type '" "std::vector< double >::value_type""'");
  } 
  temp3 = static_cast< std::vector< double >::value_type >(val3);
  arg3 = &temp3;
  {
    try {
      (arg1)->resize(arg2,(std::vector< double >::value_type const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector_resize(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_DoubleVector_resize__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_DoubleVector_resize__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DoubleVector_resize'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< double >::resize(std::vector< double >::size_type)\n"
    "    std::vector< double >::resize(std::vector< double >::size_type,std::vector< double >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_DoubleVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  std::vector< double >::iterator arg2 ;
  std::vector< double >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  std::vector< double >::value_type temp3 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< double >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector_insert", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_insert" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_insert" "', argument " "2"" of type '" "std::vector< double >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< double >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_insert" "', argument " "2"" of type '" "std::vector< double >::iterator""'");
    }
  }
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector_insert" "', argument " "3"" of type '" "std::vector< double >::value_type""'");
  } 
  temp3 = static_cast< std::vector< double >::value_type >(val3);
  arg3 = &temp3;
  {
    try {
      result = std_vector_Sl_double_Sg__insert__SWIG_0(arg1,arg2,(double const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< double >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  std::vector< double >::iterator arg2 ;
  std::vector< double >::size_type arg3 ;
  std::vector< double >::value_type *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  size_t val3 ;
  int ecode3 = 0 ;
  std::vector< double >::value_type temp4 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector_insert", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_insert" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_insert" "', argument " "2"" of type '" "std::vector< double >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< double >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "DoubleVector_insert" "', argument " "2"" of type '" "std::vector< double >::iterator""'");
    }
  }
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DoubleVector_insert" "', argument " "3"" of type '" "std::vector< double >::size_type""'");
  } 
  arg3 = static_cast< std::vector< double >::size_type >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DoubleVector_insert" "', argument " "4"" of type '" "std::vector< double >::value_type""'");
  } 
  temp4 = static_cast< std::vector< double >::value_type >(val4);
  arg4 = &temp4;
  {
    try {
      std_vector_Sl_double_Sg__insert__SWIG_1(arg1,arg2,arg3,(double const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector_insert(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter) != 0));
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_DoubleVector_insert__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< double >::iterator > *>(iter) != 0));
      if (_v) {
        {
          int res = SWIG_AsVal_size_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_DoubleVector_insert__SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'DoubleVector_insert'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< double >::insert(std::vector< double >::iterator,std::vector< double >::value_type const &)\n"
    "    std::vector< double >::insert(std::vector< double >::iterator,std::vector< double >::size_type,std::vector< double >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_DoubleVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  std::vector< double >::size_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector_reserve", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_reserve" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_reserve" "', argument " "2"" of type '" "std::vector< double >::size_type""'");
  } 
  arg2 = static_cast< std::vector< double >::size_type >(val2);
  {
    try {
      (arg1)->reserve(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DoubleVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< double >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "DoubleVector_capacity", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_capacity" "', argument " "1"" of type '" "std::vector< double > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  {
    try {
      result = ((std::vector< double > const *)arg1)->capacity();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_DoubleVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double > *arg1 = (std::vector< double > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_DoubleVector", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DoubleVector" "', argument " "1"" of type '" "std::vector< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< double > * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *DoubleVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *DoubleVector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN int Swig_var_NUM_FIELD_COMPONENTS_set(PyObject *) {
  SWIG_Error(SWIG_AttributeError,"Variable NUM_FIELD_COMPONENTS is read-only.");
  return 1;
}


SWIGINTERN PyObject *Swig_var_NUM_FIELD_COMPONENTS_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_From_int(static_cast< int >(meep::NUM_FIELD_COMPONENTS));
  return pyobj;
}


SWIGINTERN int Swig_var_NUM_FIELD_TYPES_set(PyObject *) {
  SWIG_Error(SWIG_AttributeError,"Variable NUM_FIELD_TYPES is read-only.");
  return 1;
}


SWIGINTERN PyObject *Swig_var_NUM_FIELD_TYPES_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_From_int(static_cast< int >(meep::NUM_FIELD_TYPES));
  return pyobj;
}


SWIGINTERN int Swig_var_Centered_set(PyObject *) {
  SWIG_Error(SWIG_AttributeError,"Variable Centered is read-only.");
  return 1;
}


SWIGINTERN PyObject *Swig_var_Centered_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_From_int(static_cast< int >(meep::Centered));
  return pyobj;
}


SWIGINTERN PyObject *_wrap_new_signed_direction__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::direction arg1 ;
  bool arg2 ;
  std::complex< double > arg3 ;
  int val1 ;
  int ecode1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  std::complex< double > val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::signed_direction *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_signed_direction", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_signed_direction" "', argument " "1"" of type '" "meep::direction""'");
  } 
  arg1 = static_cast< meep::direction >(val1);
  ecode2 = SWIG_AsVal_bool(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_signed_direction" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  ecode3 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_signed_direction" "', argument " "3"" of type '" "std::complex< double >""'");
  } 
  arg3 = static_cast< std::complex< double > >(val3);
  {
    try {
      result = (meep::signed_direction *)new meep::signed_direction(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__signed_direction, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_signed_direction__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::direction arg1 ;
  bool arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::signed_direction *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_signed_direction", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_signed_direction" "', argument " "1"" of type '" "meep::direction""'");
  } 
  arg1 = static_cast< meep::direction >(val1);
  ecode2 = SWIG_AsVal_bool(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_signed_direction" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  {
    try {
      result = (meep::signed_direction *)new meep::signed_direction(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__signed_direction, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_signed_direction__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::direction arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::signed_direction *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_signed_direction", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_signed_direction" "', argument " "1"" of type '" "meep::direction""'");
  } 
  arg1 = static_cast< meep::direction >(val1);
  {
    try {
      result = (meep::signed_direction *)new meep::signed_direction(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__signed_direction, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_signed_direction__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::signed_direction *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_signed_direction", 0, 0)) SWIG_fail;
  {
    try {
      result = (meep::signed_direction *)new meep::signed_direction();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__signed_direction, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_signed_direction(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_signed_direction__SWIG_3(self, args);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_signed_direction__SWIG_2(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_bool(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_signed_direction__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_bool(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new_signed_direction__SWIG_0(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_signed_direction'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::signed_direction::signed_direction(meep::direction,bool,std::complex< double >)\n"
    "    meep::signed_direction::signed_direction(meep::direction,bool)\n"
    "    meep::signed_direction::signed_direction(meep::direction)\n"
    "    meep::signed_direction::signed_direction()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_signed_direction___mul__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::signed_direction *arg1 = (meep::signed_direction *) 0 ;
  std::complex< double > arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::complex< double > val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::signed_direction result;
  
  if (!PyArg_UnpackTuple(args, "signed_direction___mul__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__signed_direction, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "signed_direction___mul__" "', argument " "1"" of type '" "meep::signed_direction *""'"); 
  }
  arg1 = reinterpret_cast< meep::signed_direction * >(argp1);
  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "signed_direction___mul__" "', argument " "2"" of type '" "std::complex< double >""'");
  } 
  arg2 = static_cast< std::complex< double > >(val2);
  {
    try {
      result = (arg1)->operator *(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::signed_direction(static_cast< const meep::signed_direction& >(result))), SWIGTYPE_p_meep__signed_direction, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_signed_direction___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::signed_direction *arg1 = (meep::signed_direction *) 0 ;
  meep::signed_direction *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "signed_direction___eq__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__signed_direction, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "signed_direction___eq__" "', argument " "1"" of type '" "meep::signed_direction const *""'"); 
  }
  arg1 = reinterpret_cast< meep::signed_direction * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__signed_direction,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "signed_direction___eq__" "', argument " "2"" of type '" "meep::signed_direction const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "signed_direction___eq__" "', argument " "2"" of type '" "meep::signed_direction const &""'"); 
  }
  arg2 = reinterpret_cast< meep::signed_direction * >(argp2);
  {
    try {
      result = (bool)((meep::signed_direction const *)arg1)->operator ==((meep::signed_direction const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_signed_direction___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::signed_direction *arg1 = (meep::signed_direction *) 0 ;
  meep::signed_direction *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "signed_direction___ne__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__signed_direction, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "signed_direction___ne__" "', argument " "1"" of type '" "meep::signed_direction const *""'"); 
  }
  arg1 = reinterpret_cast< meep::signed_direction * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__signed_direction,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "signed_direction___ne__" "', argument " "2"" of type '" "meep::signed_direction const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "signed_direction___ne__" "', argument " "2"" of type '" "meep::signed_direction const &""'"); 
  }
  arg2 = reinterpret_cast< meep::signed_direction * >(argp2);
  {
    try {
      result = (bool)((meep::signed_direction const *)arg1)->operator !=((meep::signed_direction const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_signed_direction_d_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::signed_direction *arg1 = (meep::signed_direction *) 0 ;
  meep::direction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "signed_direction_d_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__signed_direction, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "signed_direction_d_set" "', argument " "1"" of type '" "meep::signed_direction *""'"); 
  }
  arg1 = reinterpret_cast< meep::signed_direction * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "signed_direction_d_set" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  if (arg1) (arg1)->d = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_signed_direction_d_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::signed_direction *arg1 = (meep::signed_direction *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::direction result;
  
  if (!PyArg_UnpackTuple(args, "signed_direction_d_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__signed_direction, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "signed_direction_d_get" "', argument " "1"" of type '" "meep::signed_direction *""'"); 
  }
  arg1 = reinterpret_cast< meep::signed_direction * >(argp1);
  result = (meep::direction) ((arg1)->d);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_signed_direction_flipped_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::signed_direction *arg1 = (meep::signed_direction *) 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "signed_direction_flipped_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__signed_direction, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "signed_direction_flipped_set" "', argument " "1"" of type '" "meep::signed_direction *""'"); 
  }
  arg1 = reinterpret_cast< meep::signed_direction * >(argp1);
  ecode2 = SWIG_AsVal_bool(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "signed_direction_flipped_set" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  if (arg1) (arg1)->flipped = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_signed_direction_flipped_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::signed_direction *arg1 = (meep::signed_direction *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "signed_direction_flipped_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__signed_direction, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "signed_direction_flipped_get" "', argument " "1"" of type '" "meep::signed_direction *""'"); 
  }
  arg1 = reinterpret_cast< meep::signed_direction * >(argp1);
  result = (bool) ((arg1)->flipped);
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_signed_direction_phase_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::signed_direction *arg1 = (meep::signed_direction *) 0 ;
  std::complex< double > *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::complex< double > temp2 ;
  std::complex< double > val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "signed_direction_phase_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__signed_direction, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "signed_direction_phase_set" "', argument " "1"" of type '" "meep::signed_direction *""'"); 
  }
  arg1 = reinterpret_cast< meep::signed_direction * >(argp1);
  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "signed_direction_phase_set" "', argument " "2"" of type '" "std::complex< double >""'");
  } 
  temp2 = static_cast< std::complex< double > >(val2);
  arg2 = &temp2;
  if (arg1) (arg1)->phase = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_signed_direction_phase_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::signed_direction *arg1 = (meep::signed_direction *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::complex< double > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "signed_direction_phase_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__signed_direction, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "signed_direction_phase_get" "', argument " "1"" of type '" "meep::signed_direction *""'"); 
  }
  arg1 = reinterpret_cast< meep::signed_direction * >(argp1);
  result = (std::complex< double > *) & ((arg1)->phase);
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(*result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_signed_direction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::signed_direction *arg1 = (meep::signed_direction *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_signed_direction", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__signed_direction, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_signed_direction" "', argument " "1"" of type '" "meep::signed_direction *""'"); 
  }
  arg1 = reinterpret_cast< meep::signed_direction * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *signed_direction_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__signed_direction, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *signed_direction_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_number_of_directions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ndim arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "number_of_directions", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "number_of_directions" "', argument " "1"" of type '" "meep::ndim""'");
  } 
  arg1 = static_cast< meep::ndim >(val1);
  {
    try {
      result = (int)meep::number_of_directions(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_start_at_direction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ndim arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::direction result;
  
  if (!PyArg_UnpackTuple(args, "start_at_direction", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "start_at_direction" "', argument " "1"" of type '" "meep::ndim""'");
  } 
  arg1 = static_cast< meep::ndim >(val1);
  {
    try {
      result = (meep::direction)meep::start_at_direction(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_stop_at_direction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ndim arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::direction result;
  
  if (!PyArg_UnpackTuple(args, "stop_at_direction", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "stop_at_direction" "', argument " "1"" of type '" "meep::ndim""'");
  } 
  arg1 = static_cast< meep::ndim >(val1);
  {
    try {
      result = (meep::direction)meep::stop_at_direction(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_first_field_component(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::field_type arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::component result;
  
  if (!PyArg_UnpackTuple(args, "first_field_component", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "first_field_component" "', argument " "1"" of type '" "meep::field_type""'");
  } 
  arg1 = static_cast< meep::field_type >(val1);
  {
    try {
      result = (meep::component)meep::first_field_component(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_flip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::signed_direction arg1 ;
  void *argp1 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::signed_direction result;
  
  if (!PyArg_UnpackTuple(args, "flip", 1, 1, &obj0)) SWIG_fail;
  {
    res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__signed_direction,  0  | 0);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flip" "', argument " "1"" of type '" "meep::signed_direction""'"); 
    }  
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flip" "', argument " "1"" of type '" "meep::signed_direction""'");
    } else {
      meep::signed_direction * temp = reinterpret_cast< meep::signed_direction * >(argp1);
      arg1 = *temp;
      if (SWIG_IsNewObj(res1)) delete temp;
    }
  }
  {
    try {
      result = meep::flip(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::signed_direction(static_cast< const meep::signed_direction& >(result))), SWIGTYPE_p_meep__signed_direction, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_has_direction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ndim arg1 ;
  meep::direction arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "has_direction", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "has_direction" "', argument " "1"" of type '" "meep::ndim""'");
  } 
  arg1 = static_cast< meep::ndim >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "has_direction" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  {
    try {
      result = (bool)meep::has_direction(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_has_field_direction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ndim arg1 ;
  meep::direction arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "has_field_direction", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "has_field_direction" "', argument " "1"" of type '" "meep::ndim""'");
  } 
  arg1 = static_cast< meep::ndim >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "has_field_direction" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  {
    try {
      result = (bool)meep::has_field_direction(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coordinate_mismatch__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ndim arg1 ;
  meep::direction arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "coordinate_mismatch", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "coordinate_mismatch" "', argument " "1"" of type '" "meep::ndim""'");
  } 
  arg1 = static_cast< meep::ndim >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "coordinate_mismatch" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  {
    try {
      result = (bool)meep::coordinate_mismatch(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_is_tm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::component arg1 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "is_tm", 1, 1, &obj0)) SWIG_fail;
  {
    arg1 = static_cast<meep::component>(PyInteger_AsLong(obj0));
  }
  {
    try {
      result = (bool)meep::is_tm(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_abort__varargs__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *varargs) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  void *arg2 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "abort", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "abort" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    try {
      meep::abort((char const *)arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_abort(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj;
  PyObject *varargs;
  PyObject *newargs;
  
  newargs = PyTuple_GetSlice(args,0,1);
  varargs = PyTuple_GetSlice(args,1,PyTuple_Size(args));
  resultobj = _wrap_abort__varargs__(NULL,newargs,varargs);
  Py_XDECREF(newargs);
  Py_XDECREF(varargs);
  return resultobj;
}


SWIGINTERN PyObject *_wrap_is_electric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::component arg1 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "is_electric", 1, 1, &obj0)) SWIG_fail;
  {
    arg1 = static_cast<meep::component>(PyInteger_AsLong(obj0));
  }
  {
    try {
      result = (bool)meep::is_electric(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_is_magnetic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::component arg1 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "is_magnetic", 1, 1, &obj0)) SWIG_fail;
  {
    arg1 = static_cast<meep::component>(PyInteger_AsLong(obj0));
  }
  {
    try {
      result = (bool)meep::is_magnetic(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_is_D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::component arg1 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "is_D", 1, 1, &obj0)) SWIG_fail;
  {
    arg1 = static_cast<meep::component>(PyInteger_AsLong(obj0));
  }
  {
    try {
      result = (bool)meep::is_D(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_is_B(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::component arg1 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "is_B", 1, 1, &obj0)) SWIG_fail;
  {
    arg1 = static_cast<meep::component>(PyInteger_AsLong(obj0));
  }
  {
    try {
      result = (bool)meep::is_B(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_is_E_or_D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::component arg1 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "is_E_or_D", 1, 1, &obj0)) SWIG_fail;
  {
    arg1 = static_cast<meep::component>(PyInteger_AsLong(obj0));
  }
  {
    try {
      result = (bool)meep::is_E_or_D(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_is_H_or_B(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::component arg1 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "is_H_or_B", 1, 1, &obj0)) SWIG_fail;
  {
    arg1 = static_cast<meep::component>(PyInteger_AsLong(obj0));
  }
  {
    try {
      result = (bool)meep::is_H_or_B(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_is_derived(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "is_derived", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "is_derived" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    try {
      result = (bool)meep::is_derived(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_is_poynting(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::derived_component arg1 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "is_poynting", 1, 1, &obj0)) SWIG_fail;
  {
    arg1 = static_cast<meep::derived_component>(PyInteger_AsLong(obj0));
  }
  {
    try {
      result = (bool)meep::is_poynting(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_is_energydensity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::derived_component arg1 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "is_energydensity", 1, 1, &obj0)) SWIG_fail;
  {
    arg1 = static_cast<meep::derived_component>(PyInteger_AsLong(obj0));
  }
  {
    try {
      result = (bool)meep::is_energydensity(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_meep_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::component arg1 ;
  PyObject * obj0 = 0 ;
  meep::field_type result;
  
  if (!PyArg_UnpackTuple(args, "meep_type", 1, 1, &obj0)) SWIG_fail;
  {
    arg1 = static_cast<meep::component>(PyInteger_AsLong(obj0));
  }
  {
    try {
      result = (meep::field_type)meep::type(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_component_name__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::component arg1 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "component_name", 1, 1, &obj0)) SWIG_fail;
  {
    arg1 = static_cast<meep::component>(PyInteger_AsLong(obj0));
  }
  {
    try {
      result = (char *)meep::component_name(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_component_name__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::derived_component arg1 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "component_name", 1, 1, &obj0)) SWIG_fail;
  {
    arg1 = static_cast<meep::derived_component>(PyInteger_AsLong(obj0));
  }
  {
    try {
      result = (char *)meep::component_name(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_component_name__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "component_name", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "component_name" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    try {
      result = (char *)meep::component_name(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_component_name(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[2] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    {
      _v = PyInteger_Check(argv[0]) && PyInteger_AsLong(argv[0]) < 100;
    }
    if (_v) {
      return _wrap_component_name__SWIG_0(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    {
      _v = PyInteger_Check(argv[0]) && PyInteger_AsLong(argv[0]) >= 100;
    }
    if (_v) {
      return _wrap_component_name__SWIG_1(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_component_name__SWIG_2(self, args);
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'component_name'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::component_name(meep::component)\n"
    "    meep::component_name(meep::derived_component)\n"
    "    meep::component_name(int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_direction_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::direction arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "direction_name", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "direction_name" "', argument " "1"" of type '" "meep::direction""'");
  } 
  arg1 = static_cast< meep::direction >(val1);
  {
    try {
      result = (char *)meep::direction_name(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dimension_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ndim arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dimension_name", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "dimension_name" "', argument " "1"" of type '" "meep::ndim""'");
  } 
  arg1 = static_cast< meep::ndim >(val1);
  {
    try {
      result = (char *)meep::dimension_name(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_component_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::component arg1 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "component_index", 1, 1, &obj0)) SWIG_fail;
  {
    arg1 = static_cast<meep::component>(PyInteger_AsLong(obj0));
  }
  {
    try {
      result = (int)meep::component_index(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_component_direction__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::direction result;
  
  if (!PyArg_UnpackTuple(args, "component_direction", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "component_direction" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    try {
      result = (meep::direction)meep::component_direction(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_direction_component__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  meep::direction arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "direction_component", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "direction_component" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "direction_component" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  {
    try {
      result = (int)meep::direction_component(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_component_direction__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::component arg1 ;
  PyObject * obj0 = 0 ;
  meep::direction result;
  
  if (!PyArg_UnpackTuple(args, "component_direction", 1, 1, &obj0)) SWIG_fail;
  {
    arg1 = static_cast<meep::component>(PyInteger_AsLong(obj0));
  }
  {
    try {
      result = (meep::direction)meep::component_direction(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_component_direction__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::derived_component arg1 ;
  PyObject * obj0 = 0 ;
  meep::direction result;
  
  if (!PyArg_UnpackTuple(args, "component_direction", 1, 1, &obj0)) SWIG_fail;
  {
    arg1 = static_cast<meep::derived_component>(PyInteger_AsLong(obj0));
  }
  {
    try {
      result = (meep::direction)meep::component_direction(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_component_direction(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[2] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    {
      _v = PyInteger_Check(argv[0]) && PyInteger_AsLong(argv[0]) < 100;
    }
    if (_v) {
      return _wrap_component_direction__SWIG_1(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    {
      _v = PyInteger_Check(argv[0]) && PyInteger_AsLong(argv[0]) >= 100;
    }
    if (_v) {
      return _wrap_component_direction__SWIG_2(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_component_direction__SWIG_0(self, args);
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'component_direction'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::component_direction(int)\n"
    "    meep::component_direction(meep::component)\n"
    "    meep::component_direction(meep::derived_component)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_direction_component__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::component arg1 ;
  meep::direction arg2 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::component result;
  
  if (!PyArg_UnpackTuple(args, "direction_component", 2, 2, &obj0, &obj1)) SWIG_fail;
  {
    arg1 = static_cast<meep::component>(PyInteger_AsLong(obj0));
  }
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "direction_component" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  {
    try {
      result = (meep::component)meep::direction_component(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_direction_component__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::derived_component arg1 ;
  meep::direction arg2 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::derived_component result;
  
  if (!PyArg_UnpackTuple(args, "direction_component", 2, 2, &obj0, &obj1)) SWIG_fail;
  {
    arg1 = static_cast<meep::derived_component>(PyInteger_AsLong(obj0));
  }
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "direction_component" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  {
    try {
      result = (meep::derived_component)meep::direction_component(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_direction_component(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    {
      _v = PyInteger_Check(argv[0]) && PyInteger_AsLong(argv[0]) < 100;
    }
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_direction_component__SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      _v = PyInteger_Check(argv[0]) && PyInteger_AsLong(argv[0]) >= 100;
    }
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_direction_component__SWIG_2(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_direction_component__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'direction_component'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::direction_component(int,meep::direction)\n"
    "    meep::direction_component(meep::component,meep::direction)\n"
    "    meep::direction_component(meep::derived_component,meep::direction)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_field_type_component(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::field_type arg1 ;
  meep::component arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::component result;
  
  if (!PyArg_UnpackTuple(args, "field_type_component", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "field_type_component" "', argument " "1"" of type '" "meep::field_type""'");
  } 
  arg1 = static_cast< meep::field_type >(val1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    try {
      result = (meep::component)meep::field_type_component(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coordinate_mismatch__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ndim arg1 ;
  meep::component arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "coordinate_mismatch", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "coordinate_mismatch" "', argument " "1"" of type '" "meep::ndim""'");
  } 
  arg1 = static_cast< meep::ndim >(val1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    try {
      result = (bool)meep::coordinate_mismatch(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coordinate_mismatch__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ndim arg1 ;
  meep::derived_component arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "coordinate_mismatch", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "coordinate_mismatch" "', argument " "1"" of type '" "meep::ndim""'");
  } 
  arg1 = static_cast< meep::ndim >(val1);
  {
    arg2 = static_cast<meep::derived_component>(PyInteger_AsLong(obj1));
  }
  {
    try {
      result = (bool)meep::coordinate_mismatch(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coordinate_mismatch(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        return _wrap_coordinate_mismatch__SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) >= 100;
      }
      if (_v) {
        return _wrap_coordinate_mismatch__SWIG_2(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_coordinate_mismatch__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'coordinate_mismatch'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::coordinate_mismatch(meep::ndim,meep::direction)\n"
    "    meep::coordinate_mismatch(meep::ndim,meep::component)\n"
    "    meep::coordinate_mismatch(meep::ndim,meep::derived_component)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_cycle_direction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ndim arg1 ;
  meep::direction arg2 ;
  int arg3 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::direction result;
  
  if (!PyArg_UnpackTuple(args, "cycle_direction", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cycle_direction" "', argument " "1"" of type '" "meep::ndim""'");
  } 
  arg1 = static_cast< meep::ndim >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cycle_direction" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cycle_direction" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      result = (meep::direction)meep::cycle_direction(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_cycle_component(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ndim arg1 ;
  meep::component arg2 ;
  int arg3 ;
  int val1 ;
  int ecode1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::component result;
  
  if (!PyArg_UnpackTuple(args, "cycle_component", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cycle_component" "', argument " "1"" of type '" "meep::ndim""'");
  } 
  arg1 = static_cast< meep::ndim >(val1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cycle_component" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      result = (meep::component)meep::cycle_component(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_veccyl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "veccyl", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "veccyl" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "veccyl" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = meep::veccyl(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_zero_vec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ndim arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "zero_vec", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "zero_vec" "', argument " "1"" of type '" "meep::ndim""'");
  } 
  arg1 = static_cast< meep::ndim >(val1);
  {
    try {
      result = meep::zero_vec(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new__vec__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new__vec", 0, 0)) SWIG_fail;
  {
    try {
      result = (meep::vec *)new meep::vec();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_vec_dim(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ndim arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::vec *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_vec_dim", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vec_dim" "', argument " "1"" of type '" "meep::ndim""'");
  } 
  arg1 = static_cast< meep::ndim >(val1);
  {
    try {
      result = (meep::vec *)new meep::vec(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_vec_dim_val(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ndim arg1 ;
  double arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::vec *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_vec_dim_val", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_vec_dim_val" "', argument " "1"" of type '" "meep::ndim""'");
  } 
  arg1 = static_cast< meep::ndim >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_vec_dim_val" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = (meep::vec *)new meep::vec(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new__vec__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::vec *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new__vec", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new__vec" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  {
    try {
      result = (meep::vec *)new meep::vec(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new__vec__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::vec *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new__vec", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new__vec" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new__vec" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = (meep::vec *)new meep::vec(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new__vec__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::vec *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new__vec", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new__vec" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new__vec" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new__vec" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      result = (meep::vec *)new meep::vec(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new__vec(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new__vec__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new__vec__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new__vec__SWIG_2(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new__vec__SWIG_3(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new__vec'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::vec::vec()\n"
    "    meep::vec::vec(double)\n"
    "    meep::vec::vec(double,double)\n"
    "    meep::vec::vec(double,double,double)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_vec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = (meep::vec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_vec", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__vec, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vec" "', argument " "1"" of type '" "meep::vec *""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vec___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = (meep::vec *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "vec___add__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec___add__" "', argument " "1"" of type '" "meep::vec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vec___add__" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vec___add__" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = ((meep::vec const *)arg1)->operator +((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_vec___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = (meep::vec *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "vec___iadd__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__vec, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec___iadd__" "', argument " "1"" of type '" "meep::vec *""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vec___iadd__" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vec___iadd__" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = (arg1)->operator +=((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vec___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = (meep::vec *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "vec___sub__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec___sub__" "', argument " "1"" of type '" "meep::vec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vec___sub__" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vec___sub__" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = ((meep::vec const *)arg1)->operator -((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_vec___neg__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = (meep::vec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "vec___neg__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec___neg__" "', argument " "1"" of type '" "meep::vec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  {
    try {
      result = ((meep::vec const *)arg1)->operator -();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_vec___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = (meep::vec *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "vec___isub__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__vec, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec___isub__" "', argument " "1"" of type '" "meep::vec *""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vec___isub__" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vec___isub__" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = (arg1)->operator -=((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vec___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = (meep::vec *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "vec___ne__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec___ne__" "', argument " "1"" of type '" "meep::vec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vec___ne__" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vec___ne__" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = (bool)((meep::vec const *)arg1)->operator !=((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_vec___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = (meep::vec *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "vec___eq__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec___eq__" "', argument " "1"" of type '" "meep::vec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vec___eq__" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vec___eq__" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = (bool)((meep::vec const *)arg1)->operator ==((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_vec_round_float(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = (meep::vec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "vec_round_float", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec_round_float" "', argument " "1"" of type '" "meep::vec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  {
    try {
      result = ((meep::vec const *)arg1)->round_float();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vec___mul__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = (meep::vec *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "vec___mul__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec___mul__" "', argument " "1"" of type '" "meep::vec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vec___mul__" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = ((meep::vec const *)arg1)->operator *(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_vec___truediv__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = (meep::vec *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "vec___truediv__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec___truediv__" "', argument " "1"" of type '" "meep::vec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vec___truediv__" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = ((meep::vec const *)arg1)->operator /(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_vec___and__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = (meep::vec *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "vec___and__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec___and__" "', argument " "1"" of type '" "meep::vec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vec___and__" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vec___and__" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = (double)((meep::vec const *)arg1)->operator &((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_vec_dim_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = (meep::vec *) 0 ;
  meep::ndim arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "vec_dim_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec_dim_set" "', argument " "1"" of type '" "meep::vec *""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vec_dim_set" "', argument " "2"" of type '" "meep::ndim""'");
  } 
  arg2 = static_cast< meep::ndim >(val2);
  if (arg1) (arg1)->dim = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vec_dim_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = (meep::vec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::ndim result;
  
  if (!PyArg_UnpackTuple(args, "vec_dim_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec_dim_get" "', argument " "1"" of type '" "meep::vec *""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  result = (meep::ndim) ((arg1)->dim);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vec_r(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = (meep::vec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "vec_r", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec_r" "', argument " "1"" of type '" "meep::vec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  {
    try {
      result = (double)((meep::vec const *)arg1)->r();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vec_x(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = (meep::vec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "vec_x", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec_x" "', argument " "1"" of type '" "meep::vec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  {
    try {
      result = (double)((meep::vec const *)arg1)->x();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vec_y(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = (meep::vec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "vec_y", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec_y" "', argument " "1"" of type '" "meep::vec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  {
    try {
      result = (double)((meep::vec const *)arg1)->y();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vec_z(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = (meep::vec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "vec_z", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec_z" "', argument " "1"" of type '" "meep::vec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  {
    try {
      result = (double)((meep::vec const *)arg1)->z();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vec_in_direction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = (meep::vec *) 0 ;
  meep::direction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "vec_in_direction", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec_in_direction" "', argument " "1"" of type '" "meep::vec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vec_in_direction" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  {
    try {
      result = (double)((meep::vec const *)arg1)->in_direction(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vec_set_direction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = (meep::vec *) 0 ;
  meep::direction arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "vec_set_direction", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec_set_direction" "', argument " "1"" of type '" "meep::vec *""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vec_set_direction" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vec_set_direction" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      (arg1)->set_direction(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vec_project_to_boundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = (meep::vec *) 0 ;
  meep::direction arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "vec_project_to_boundary", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec_project_to_boundary" "', argument " "1"" of type '" "meep::vec *""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vec_project_to_boundary" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vec_project_to_boundary" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      result = (double)(arg1)->project_to_boundary(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vec___repr__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = (meep::vec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "vec___repr__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec___repr__" "', argument " "1"" of type '" "meep::vec *""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  {
    try {
      result = (char *)meep_vec___repr__(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *vec_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__vec, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_vec_abs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "vec_abs", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec_abs" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vec_abs" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  {
    try {
      result = (double)meep::abs((meep::vec const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_one_vec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ndim arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "one_vec", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "one_vec" "', argument " "1"" of type '" "meep::ndim""'");
  } 
  arg1 = static_cast< meep::ndim >(val1);
  {
    try {
      result = meep::one_vec(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_unit_vec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ndim arg1 ;
  meep::direction arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "unit_vec", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "unit_vec" "', argument " "1"" of type '" "meep::ndim""'");
  } 
  arg1 = static_cast< meep::ndim >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "unit_vec" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  {
    try {
      result = meep::unit_vec(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_clean_vec__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "clean_vec", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "clean_vec" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "clean_vec" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "clean_vec" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = meep::clean_vec((meep::vec const &)*arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_clean_vec__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "clean_vec", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "clean_vec" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "clean_vec" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  {
    try {
      result = meep::clean_vec((meep::vec const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_clean_vec(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_clean_vec__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_clean_vec__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'clean_vec'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::clean_vec(meep::vec const &,double)\n"
    "    meep::clean_vec(meep::vec const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_iveccyl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "iveccyl", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "iveccyl" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "iveccyl" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      result = meep::iveccyl(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_zero_ivec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ndim arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "zero_ivec", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "zero_ivec" "', argument " "1"" of type '" "meep::ndim""'");
  } 
  arg1 = static_cast< meep::ndim >(val1);
  {
    try {
      result = meep::zero_ivec(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_one_ivec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ndim arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "one_ivec", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "one_ivec" "', argument " "1"" of type '" "meep::ndim""'");
  } 
  arg1 = static_cast< meep::ndim >(val1);
  {
    try {
      result = meep::one_ivec(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_ivec__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_ivec", 0, 0)) SWIG_fail;
  {
    try {
      result = (meep::ivec *)new meep::ivec();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__ivec, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_ivec__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ndim arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::ivec *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_ivec", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ivec" "', argument " "1"" of type '" "meep::ndim""'");
  } 
  arg1 = static_cast< meep::ndim >(val1);
  {
    try {
      result = (meep::ivec *)new meep::ivec(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__ivec, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_ivec__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ndim arg1 ;
  int arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::ivec *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_ivec", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ivec" "', argument " "1"" of type '" "meep::ndim""'");
  } 
  arg1 = static_cast< meep::ndim >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ivec" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      result = (meep::ivec *)new meep::ivec(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__ivec, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_ivec__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::ivec *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_ivec", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ivec" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    try {
      result = (meep::ivec *)new meep::ivec(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__ivec, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_ivec__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::ivec *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_ivec", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ivec" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ivec" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      result = (meep::ivec *)new meep::ivec(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__ivec, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_ivec__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  int arg3 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::ivec *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_ivec", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ivec" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ivec" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ivec" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      result = (meep::ivec *)new meep::ivec(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__ivec, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_ivec(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_ivec__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_ivec__SWIG_1(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_ivec__SWIG_3(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_ivec__SWIG_2(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_ivec__SWIG_4(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new_ivec__SWIG_5(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_ivec'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::ivec::ivec()\n"
    "    meep::ivec::ivec(meep::ndim)\n"
    "    meep::ivec::ivec(meep::ndim,int)\n"
    "    meep::ivec::ivec(int)\n"
    "    meep::ivec::ivec(int,int)\n"
    "    meep::ivec::ivec(int,int,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_ivec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_ivec", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ivec" "', argument " "1"" of type '" "meep::ivec *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ivec_yucky_val(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "ivec_yucky_val", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec_yucky_val" "', argument " "1"" of type '" "meep::ivec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ivec_yucky_val" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      result = (int)((meep::ivec const *)arg1)->yucky_val(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ivec___add____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  meep::ivec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "ivec___add__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec___add__" "', argument " "1"" of type '" "meep::ivec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ivec___add__" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ivec___add__" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  {
    try {
      result = ((meep::ivec const *)arg1)->operator +((meep::ivec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_ivec___add____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "ivec___add__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec___add__" "', argument " "1"" of type '" "meep::ivec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ivec___add__" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      result = ((meep::ivec const *)arg1)->operator +(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_ivec___add__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__ivec, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_ivec___add____SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__ivec, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_ivec___add____SWIG_1(self, args);
      }
    }
  }
  
fail:
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_ivec___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  meep::ivec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "ivec___iadd__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec___iadd__" "', argument " "1"" of type '" "meep::ivec *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ivec___iadd__" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ivec___iadd__" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  {
    try {
      result = (arg1)->operator +=((meep::ivec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ivec___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  meep::ivec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "ivec___sub__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec___sub__" "', argument " "1"" of type '" "meep::ivec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ivec___sub__" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ivec___sub__" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  {
    try {
      result = ((meep::ivec const *)arg1)->operator -((meep::ivec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_ivec___neg__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "ivec___neg__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec___neg__" "', argument " "1"" of type '" "meep::ivec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  {
    try {
      result = ((meep::ivec const *)arg1)->operator -();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_ivec___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  meep::ivec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "ivec___isub__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec___isub__" "', argument " "1"" of type '" "meep::ivec *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ivec___isub__" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ivec___isub__" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  {
    try {
      result = (arg1)->operator -=((meep::ivec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ivec___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  meep::ivec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "ivec___ne__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec___ne__" "', argument " "1"" of type '" "meep::ivec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ivec___ne__" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ivec___ne__" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  {
    try {
      result = (bool)((meep::ivec const *)arg1)->operator !=((meep::ivec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_ivec___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  meep::ivec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "ivec___eq__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec___eq__" "', argument " "1"" of type '" "meep::ivec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ivec___eq__" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ivec___eq__" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  {
    try {
      result = (bool)((meep::ivec const *)arg1)->operator ==((meep::ivec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_ivec___le__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  meep::ivec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "ivec___le__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec___le__" "', argument " "1"" of type '" "meep::ivec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ivec___le__" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ivec___le__" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  {
    try {
      result = (bool)((meep::ivec const *)arg1)->operator <=((meep::ivec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_ivec___ge__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  meep::ivec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "ivec___ge__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec___ge__" "', argument " "1"" of type '" "meep::ivec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ivec___ge__" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ivec___ge__" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  {
    try {
      result = (bool)((meep::ivec const *)arg1)->operator >=((meep::ivec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_ivec___lt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  meep::ivec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "ivec___lt__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec___lt__" "', argument " "1"" of type '" "meep::ivec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ivec___lt__" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ivec___lt__" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  {
    try {
      result = (bool)((meep::ivec const *)arg1)->operator <((meep::ivec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_ivec___gt__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  meep::ivec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "ivec___gt__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec___gt__" "', argument " "1"" of type '" "meep::ivec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ivec___gt__" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ivec___gt__" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  {
    try {
      result = (bool)((meep::ivec const *)arg1)->operator >((meep::ivec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_ivec___mul____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "ivec___mul__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec___mul__" "', argument " "1"" of type '" "meep::ivec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ivec___mul__" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      result = ((meep::ivec const *)arg1)->operator *(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_ivec___mul____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  meep::ivec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "ivec___mul__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec___mul__" "', argument " "1"" of type '" "meep::ivec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ivec___mul__" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ivec___mul__" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  {
    try {
      result = ((meep::ivec const *)arg1)->operator *((meep::ivec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_ivec___truediv__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "ivec___truediv__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec___truediv__" "', argument " "1"" of type '" "meep::ivec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ivec___truediv__" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      result = ((meep::ivec const *)arg1)->operator /(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_ivec___mul____SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "ivec___mul__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec___mul__" "', argument " "1"" of type '" "meep::ivec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ivec___mul__" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = ((meep::ivec const *)arg1)->operator *(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_ivec___mul__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__ivec, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_ivec___mul____SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__ivec, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_ivec___mul____SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__ivec, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_ivec___mul____SWIG_2(self, args);
      }
    }
  }
  
fail:
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_ivec_dim_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  meep::ndim arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ivec_dim_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec_dim_set" "', argument " "1"" of type '" "meep::ivec *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ivec_dim_set" "', argument " "2"" of type '" "meep::ndim""'");
  } 
  arg2 = static_cast< meep::ndim >(val2);
  if (arg1) (arg1)->dim = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ivec_dim_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::ndim result;
  
  if (!PyArg_UnpackTuple(args, "ivec_dim_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec_dim_get" "', argument " "1"" of type '" "meep::ivec *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  result = (meep::ndim) ((arg1)->dim);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ivec_r(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "ivec_r", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec_r" "', argument " "1"" of type '" "meep::ivec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  {
    try {
      result = (int)((meep::ivec const *)arg1)->r();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ivec_x(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "ivec_x", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec_x" "', argument " "1"" of type '" "meep::ivec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  {
    try {
      result = (int)((meep::ivec const *)arg1)->x();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ivec_y(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "ivec_y", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec_y" "', argument " "1"" of type '" "meep::ivec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  {
    try {
      result = (int)((meep::ivec const *)arg1)->y();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ivec_z(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "ivec_z", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec_z" "', argument " "1"" of type '" "meep::ivec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  {
    try {
      result = (int)((meep::ivec const *)arg1)->z();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ivec_in_direction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  meep::direction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "ivec_in_direction", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec_in_direction" "', argument " "1"" of type '" "meep::ivec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ivec_in_direction" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  {
    try {
      result = (int)((meep::ivec const *)arg1)->in_direction(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ivec_set_direction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  meep::direction arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ivec_set_direction", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec_set_direction" "', argument " "1"" of type '" "meep::ivec *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ivec_set_direction" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ivec_set_direction" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      (arg1)->set_direction(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ivec_round_down_to_even(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "ivec_round_down_to_even", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec_round_down_to_even" "', argument " "1"" of type '" "meep::ivec const *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  {
    try {
      result = ((meep::ivec const *)arg1)->round_down_to_even();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ivec___repr__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = (meep::ivec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ivec___repr__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ivec___repr__" "', argument " "1"" of type '" "meep::ivec *""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  {
    try {
      result = (char *)meep_ivec___repr__(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *ivec_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__ivec, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *ivec_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_unit_ivec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ndim arg1 ;
  meep::direction arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "unit_ivec", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "unit_ivec" "', argument " "1"" of type '" "meep::ndim""'");
  } 
  arg1 = static_cast< meep::ndim >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "unit_ivec" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  {
    try {
      result = meep::unit_ivec(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vec_max__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "vec_max", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec_max" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vec_max" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vec_max" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vec_max" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = meep::max((meep::vec const &)*arg1,(meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vec_min__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "vec_min", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec_min" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vec_min" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vec_min" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vec_min" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = meep::min((meep::vec const &)*arg1,(meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vec_max__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = 0 ;
  meep::ivec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "vec_max", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec_max" "', argument " "1"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vec_max" "', argument " "1"" of type '" "meep::ivec const &""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vec_max" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vec_max" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  {
    try {
      result = meep::max((meep::ivec const &)*arg1,(meep::ivec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vec_max(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_vec_max__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_vec_max__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vec_max'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::max(meep::vec const &,meep::vec const &)\n"
    "    meep::max(meep::ivec const &,meep::ivec const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_vec_min__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = 0 ;
  meep::ivec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "vec_min", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec_min" "', argument " "1"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vec_min" "', argument " "1"" of type '" "meep::ivec const &""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vec_min" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vec_min" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  {
    try {
      result = meep::min((meep::ivec const &)*arg1,(meep::ivec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vec_min(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_vec_min__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_vec_min__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'vec_min'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::min(meep::vec const &,meep::vec const &)\n"
    "    meep::min(meep::ivec const &,meep::ivec const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_max_to_all__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ivec *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "max_to_all", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "max_to_all" "', argument " "1"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "max_to_all" "', argument " "1"" of type '" "meep::ivec const &""'"); 
  }
  arg1 = reinterpret_cast< meep::ivec * >(argp1);
  {
    try {
      result = meep::max_to_all((meep::ivec const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume_dim_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  meep::ndim arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "volume_dim_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_dim_set" "', argument " "1"" of type '" "meep::volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "volume_dim_set" "', argument " "2"" of type '" "meep::ndim""'");
  } 
  arg2 = static_cast< meep::ndim >(val2);
  if (arg1) (arg1)->dim = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume_dim_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::ndim result;
  
  if (!PyArg_UnpackTuple(args, "volume_dim_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_dim_get" "', argument " "1"" of type '" "meep::volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  result = (meep::ndim) ((arg1)->dim);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_volume__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::ndim arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::volume *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_volume", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_volume" "', argument " "1"" of type '" "meep::ndim""'");
  } 
  arg1 = static_cast< meep::ndim >(val1);
  {
    try {
      result = (meep::volume *)new meep::volume(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__volume, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_volume__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::volume *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_volume", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_volume" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_volume" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_volume" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_volume" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = (meep::volume *)new meep::volume((meep::vec const &)*arg1,(meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__volume, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_volume__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::volume *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_volume", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_volume" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_volume" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  {
    try {
      result = (meep::volume *)new meep::volume((meep::vec const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__volume, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_volume(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_volume__SWIG_2(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_volume__SWIG_0(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_new_volume__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_volume'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::volume::volume(meep::ndim)\n"
    "    meep::volume::volume(meep::vec const &,meep::vec const &)\n"
    "    meep::volume::volume(meep::vec const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_volume_set_direction_min(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  meep::direction arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "volume_set_direction_min", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_set_direction_min" "', argument " "1"" of type '" "meep::volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "volume_set_direction_min" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "volume_set_direction_min" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      (arg1)->set_direction_min(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume_set_direction_max(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  meep::direction arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "volume_set_direction_max", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_set_direction_max" "', argument " "1"" of type '" "meep::volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "volume_set_direction_max" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "volume_set_direction_max" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      (arg1)->set_direction_max(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume_in_direction_min(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  meep::direction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "volume_in_direction_min", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_in_direction_min" "', argument " "1"" of type '" "meep::volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "volume_in_direction_min" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  {
    try {
      result = (double)((meep::volume const *)arg1)->in_direction_min(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume_in_direction_max(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  meep::direction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "volume_in_direction_max", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_in_direction_max" "', argument " "1"" of type '" "meep::volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "volume_in_direction_max" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  {
    try {
      result = (double)((meep::volume const *)arg1)->in_direction_max(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume_in_direction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  meep::direction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "volume_in_direction", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_in_direction" "', argument " "1"" of type '" "meep::volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "volume_in_direction" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  {
    try {
      result = (double)((meep::volume const *)arg1)->in_direction(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume_computational_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "volume_computational_volume", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_computational_volume" "', argument " "1"" of type '" "meep::volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  {
    try {
      result = (double)((meep::volume const *)arg1)->computational_volume();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume_integral_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "volume_integral_volume", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_integral_volume" "', argument " "1"" of type '" "meep::volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  {
    try {
      result = (double)((meep::volume const *)arg1)->integral_volume();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume_full_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "volume_full_volume", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_full_volume" "', argument " "1"" of type '" "meep::volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  {
    try {
      result = (double)((meep::volume const *)arg1)->full_volume();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume_center(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "volume_center", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_center" "', argument " "1"" of type '" "meep::volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  {
    try {
      result = ((meep::volume const *)arg1)->center();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume_diameter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "volume_diameter", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_diameter" "', argument " "1"" of type '" "meep::volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  {
    try {
      result = (double)((meep::volume const *)arg1)->diameter();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume_contains__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "volume_contains", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_contains" "', argument " "1"" of type '" "meep::volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "volume_contains" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "volume_contains" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = (bool)((meep::volume const *)arg1)->contains((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume_contains__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  meep::volume *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "volume_contains", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_contains" "', argument " "1"" of type '" "meep::volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "volume_contains" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "volume_contains" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    try {
      result = (bool)((meep::volume const *)arg1)->contains((meep::volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume_contains(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__volume, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_volume_contains__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__volume, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_volume_contains__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'volume_contains'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::volume::contains(meep::vec const &) const\n"
    "    meep::volume::contains(meep::volume const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_volume_intersect_with(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  meep::volume *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  SwigValueWrapper< meep::volume > result;
  
  if (!PyArg_UnpackTuple(args, "volume_intersect_with", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_intersect_with" "', argument " "1"" of type '" "meep::volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "volume_intersect_with" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "volume_intersect_with" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    try {
      result = ((meep::volume const *)arg1)->intersect_with((meep::volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::volume(static_cast< const meep::volume& >(result))), SWIGTYPE_p_meep__volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume___and__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  meep::volume *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  SwigValueWrapper< meep::volume > result;
  
  if (!PyArg_UnpackTuple(args, "volume___and__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume___and__" "', argument " "1"" of type '" "meep::volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "volume___and__" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "volume___and__" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    try {
      result = ((meep::volume const *)arg1)->operator &((meep::volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::volume(static_cast< const meep::volume& >(result))), SWIGTYPE_p_meep__volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_volume___or__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  meep::volume *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  SwigValueWrapper< meep::volume > result;
  
  if (!PyArg_UnpackTuple(args, "volume___or__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume___or__" "', argument " "1"" of type '" "meep::volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "volume___or__" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "volume___or__" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    try {
      result = ((meep::volume const *)arg1)->operator |((meep::volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::volume(static_cast< const meep::volume& >(result))), SWIGTYPE_p_meep__volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_volume___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  SwigValueWrapper< meep::volume > result;
  
  if (!PyArg_UnpackTuple(args, "volume___add__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume___add__" "', argument " "1"" of type '" "meep::volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "volume___add__" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "volume___add__" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = ((meep::volume const *)arg1)->operator +((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::volume(static_cast< const meep::volume& >(result))), SWIGTYPE_p_meep__volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_volume___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  SwigValueWrapper< meep::volume > result;
  
  if (!PyArg_UnpackTuple(args, "volume___iadd__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume___iadd__" "', argument " "1"" of type '" "meep::volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "volume___iadd__" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "volume___iadd__" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = (arg1)->operator +=((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::volume(static_cast< const meep::volume& >(result))), SWIGTYPE_p_meep__volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  SwigValueWrapper< meep::volume > result;
  
  if (!PyArg_UnpackTuple(args, "volume___sub__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume___sub__" "', argument " "1"" of type '" "meep::volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "volume___sub__" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "volume___sub__" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = ((meep::volume const *)arg1)->operator -((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::volume(static_cast< const meep::volume& >(result))), SWIGTYPE_p_meep__volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_volume___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  SwigValueWrapper< meep::volume > result;
  
  if (!PyArg_UnpackTuple(args, "volume___isub__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume___isub__" "', argument " "1"" of type '" "meep::volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "volume___isub__" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "volume___isub__" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = (arg1)->operator -=((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::volume(static_cast< const meep::volume& >(result))), SWIGTYPE_p_meep__volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  meep::volume *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "volume___eq__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume___eq__" "', argument " "1"" of type '" "meep::volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "volume___eq__" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "volume___eq__" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    try {
      result = (bool)((meep::volume const *)arg1)->operator ==((meep::volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_volume___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  meep::volume *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "volume___ne__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume___ne__" "', argument " "1"" of type '" "meep::volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "volume___ne__" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "volume___ne__" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    try {
      result = (bool)((meep::volume const *)arg1)->operator !=((meep::volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_volume_round_float(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  SwigValueWrapper< meep::volume > result;
  
  if (!PyArg_UnpackTuple(args, "volume_round_float", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_round_float" "', argument " "1"" of type '" "meep::volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  {
    try {
      result = ((meep::volume const *)arg1)->round_float();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::volume(static_cast< const meep::volume& >(result))), SWIGTYPE_p_meep__volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume_intersects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  meep::volume *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "volume_intersects", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_intersects" "', argument " "1"" of type '" "meep::volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "volume_intersects" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "volume_intersects" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    try {
      result = (bool)((meep::volume const *)arg1)->intersects((meep::volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume___contains__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  meep::volume *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "volume___contains__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume___contains__" "', argument " "1"" of type '" "meep::volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "volume___contains__" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "volume___contains__" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    try {
      result = (bool)((meep::volume const *)arg1)->operator &&((meep::volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume_get_min_corner(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "volume_get_min_corner", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_get_min_corner" "', argument " "1"" of type '" "meep::volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  {
    try {
      result = ((meep::volume const *)arg1)->get_min_corner();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume_get_max_corner(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "volume_get_max_corner", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_get_max_corner" "', argument " "1"" of type '" "meep::volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  {
    try {
      result = ((meep::volume const *)arg1)->get_max_corner();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume_normal_direction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::direction result;
  
  if (!PyArg_UnpackTuple(args, "volume_normal_direction", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_normal_direction" "', argument " "1"" of type '" "meep::volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  {
    try {
      result = (meep::direction)((meep::volume const *)arg1)->normal_direction();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume___repr__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "volume___repr__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume___repr__" "', argument " "1"" of type '" "meep::volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  {
    try {
      result = (char *)meep_volume___repr__(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = (meep::volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_volume", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_volume" "', argument " "1"" of type '" "meep::volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *volume_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__volume, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *volume_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_volcyl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::grid_volume result;
  
  if (!PyArg_UnpackTuple(args, "volcyl", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "volcyl" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "volcyl" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "volcyl" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      result = meep::volcyl(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::grid_volume(static_cast< const meep::grid_volume& >(result))), SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::grid_volume result;
  
  if (!PyArg_UnpackTuple(args, "volone", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "volone" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "volone" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = meep::volone(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::grid_volume(static_cast< const meep::grid_volume& >(result))), SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vol1d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::grid_volume result;
  
  if (!PyArg_UnpackTuple(args, "vol1d", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "vol1d" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vol1d" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = meep::vol1d(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::grid_volume(static_cast< const meep::grid_volume& >(result))), SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_voltwo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::grid_volume result;
  
  if (!PyArg_UnpackTuple(args, "voltwo", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "voltwo" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "voltwo" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "voltwo" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      result = meep::voltwo(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::grid_volume(static_cast< const meep::grid_volume& >(result))), SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vol2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::grid_volume result;
  
  if (!PyArg_UnpackTuple(args, "vol2d", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "vol2d" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vol2d" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vol2d" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      result = meep::vol2d(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::grid_volume(static_cast< const meep::grid_volume& >(result))), SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vol3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::grid_volume result;
  
  if (!PyArg_UnpackTuple(args, "vol3d", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "vol3d" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vol3d" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vol3d" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "vol3d" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  {
    try {
      result = meep::vol3d(arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::grid_volume(static_cast< const meep::grid_volume& >(result))), SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_grid_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_grid_volume", 0, 0)) SWIG_fail;
  {
    try {
      result = (meep::grid_volume *)new meep::grid_volume();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_subvolume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::ivec arg2 ;
  meep::ivec arg3 ;
  meep::component arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::grid_volume result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_subvolume", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_subvolume" "', argument " "1"" of type '" "meep::grid_volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "grid_volume_subvolume" "', argument " "2"" of type '" "meep::ivec""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_subvolume" "', argument " "2"" of type '" "meep::ivec""'");
    } else {
      meep::ivec * temp = reinterpret_cast< meep::ivec * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__ivec,  0  | 0);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "grid_volume_subvolume" "', argument " "3"" of type '" "meep::ivec""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_subvolume" "', argument " "3"" of type '" "meep::ivec""'");
    } else {
      meep::ivec * temp = reinterpret_cast< meep::ivec * >(argp3);
      arg3 = *temp;
      if (SWIG_IsNewObj(res3)) delete temp;
    }
  }
  {
    arg4 = static_cast<meep::component>(PyInteger_AsLong(obj3));
  }
  {
    try {
      result = (arg1)->subvolume(arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::grid_volume(static_cast< const meep::grid_volume& >(result))), SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_init_subvolume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::ivec arg2 ;
  meep::ivec arg3 ;
  meep::component arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_init_subvolume", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_init_subvolume" "', argument " "1"" of type '" "meep::grid_volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "grid_volume_init_subvolume" "', argument " "2"" of type '" "meep::ivec""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_init_subvolume" "', argument " "2"" of type '" "meep::ivec""'");
    } else {
      meep::ivec * temp = reinterpret_cast< meep::ivec * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__ivec,  0  | 0);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "grid_volume_init_subvolume" "', argument " "3"" of type '" "meep::ivec""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_init_subvolume" "', argument " "3"" of type '" "meep::ivec""'");
    } else {
      meep::ivec * temp = reinterpret_cast< meep::ivec * >(argp3);
      arg3 = *temp;
      if (SWIG_IsNewObj(res3)) delete temp;
    }
  }
  {
    arg4 = static_cast<meep::component>(PyInteger_AsLong(obj3));
  }
  {
    try {
      (arg1)->init_subvolume(arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_dim_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::ndim arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_dim_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_dim_set" "', argument " "1"" of type '" "meep::grid_volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grid_volume_dim_set" "', argument " "2"" of type '" "meep::ndim""'");
  } 
  arg2 = static_cast< meep::ndim >(val2);
  if (arg1) (arg1)->dim = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_dim_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::ndim result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_dim_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_dim_get" "', argument " "1"" of type '" "meep::grid_volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  result = (meep::ndim) ((arg1)->dim);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_a_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_a_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_a_set" "', argument " "1"" of type '" "meep::grid_volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grid_volume_a_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->a = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_a_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_a_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_a_get" "', argument " "1"" of type '" "meep::grid_volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  result = (double) ((arg1)->a);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_inva_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_inva_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_inva_set" "', argument " "1"" of type '" "meep::grid_volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grid_volume_inva_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->inva = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_inva_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_inva_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_inva_get" "', argument " "1"" of type '" "meep::grid_volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  result = (double) ((arg1)->inva);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_print_grid_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_print_grid_volume", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_print_grid_volume" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      ((meep::grid_volume const *)arg1)->print();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_stride(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::direction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  ptrdiff_t result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_stride", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_stride" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grid_volume_stride" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->stride(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_num_direction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::direction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_num_direction", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_num_direction" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grid_volume_num_direction" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  {
    try {
      result = (int)((meep::grid_volume const *)arg1)->num_direction(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_yucky_num(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_yucky_num", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_yucky_num" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grid_volume_yucky_num" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      result = (int)((meep::grid_volume const *)arg1)->yucky_num(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_yucky_direction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::direction result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_yucky_direction", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_yucky_direction" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grid_volume_yucky_direction" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      result = (meep::direction)((meep::grid_volume const *)arg1)->yucky_direction(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_set_num_direction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::direction arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_set_num_direction", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_set_num_direction" "', argument " "1"" of type '" "meep::grid_volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grid_volume_set_num_direction" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "grid_volume_set_num_direction" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      (arg1)->set_num_direction(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_nr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_nr", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_nr" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = (int)((meep::grid_volume const *)arg1)->nr();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_nx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_nx", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_nx" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = (int)((meep::grid_volume const *)arg1)->nx();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_ny(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_ny", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_ny" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = (int)((meep::grid_volume const *)arg1)->ny();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_nz(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_nz", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_nz" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = (int)((meep::grid_volume const *)arg1)->nz();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_has_field(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::component arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_has_field", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_has_field" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    try {
      result = (bool)((meep::grid_volume const *)arg1)->has_field(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_has_boundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::boundary_side arg2 ;
  meep::direction arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_has_boundary", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_has_boundary" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grid_volume_has_boundary" "', argument " "2"" of type '" "meep::boundary_side""'");
  } 
  arg2 = static_cast< meep::boundary_side >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "grid_volume_has_boundary" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  {
    try {
      result = (int)((meep::grid_volume const *)arg1)->has_boundary(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_dr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_dr", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_dr" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->dr();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_dx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_dx", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_dx" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->dx();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_dy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_dy", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_dy" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->dy();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_dz(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_dz", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_dz" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->dz();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_ntot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  size_t result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_ntot", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_ntot" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->ntot();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_nowned_min(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  size_t result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_nowned_min", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_nowned_min" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->nowned_min();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_nowned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::component arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  size_t result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_nowned", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_nowned" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    try {
      result = ((meep::grid_volume const *)arg1)->nowned(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::ivec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume___getitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume___getitem__" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "grid_volume___getitem__" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume___getitem__" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->operator []((meep::ivec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::component arg2 ;
  meep::ivec *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  ptrdiff_t result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_index", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_index" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "grid_volume_index" "', argument " "3"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_index" "', argument " "3"" of type '" "meep::ivec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::ivec * >(argp3);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->index(arg2,(meep::ivec const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_round_vec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_round_vec", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_round_vec" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "grid_volume_round_vec" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_round_vec" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->round_vec((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_interpolate__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::component arg2 ;
  meep::vec *arg3 = 0 ;
  ptrdiff_t *arg4 ;
  double *arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_interpolate", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_interpolate" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "grid_volume_interpolate" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_interpolate" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_ptrdiff_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "grid_volume_interpolate" "', argument " "4"" of type '" "ptrdiff_t [8]""'"); 
  } 
  arg4 = reinterpret_cast< ptrdiff_t * >(argp4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "grid_volume_interpolate" "', argument " "5"" of type '" "double [8]""'"); 
  } 
  arg5 = reinterpret_cast< double * >(argp5);
  {
    try {
      ((meep::grid_volume const *)arg1)->interpolate(arg2,(meep::vec const &)*arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_interpolate__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::component arg2 ;
  meep::vec *arg3 = 0 ;
  meep::ivec *arg4 ;
  double *arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_interpolate", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_interpolate" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "grid_volume_interpolate" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_interpolate" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "grid_volume_interpolate" "', argument " "4"" of type '" "meep::ivec [8]""'"); 
  } 
  arg4 = reinterpret_cast< meep::ivec * >(argp4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "grid_volume_interpolate" "', argument " "5"" of type '" "double [8]""'"); 
  } 
  arg5 = reinterpret_cast< double * >(argp5);
  {
    try {
      ((meep::grid_volume const *)arg1)->interpolate(arg2,(meep::vec const &)*arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_interpolate(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__grid_volume, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_ptrdiff_t, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_double, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_grid_volume_interpolate__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__grid_volume, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__ivec, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_double, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_grid_volume_interpolate__SWIG_1(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'grid_volume_interpolate'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::grid_volume::interpolate(meep::component,meep::vec const &,ptrdiff_t [8],double [8]) const\n"
    "    meep::grid_volume::interpolate(meep::component,meep::vec const &,meep::ivec [8],double [8]) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_grid_volume_dV__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::component arg2 ;
  ptrdiff_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  SwigValueWrapper< meep::volume > result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_dV", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_dV" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "grid_volume_dV" "', argument " "3"" of type '" "ptrdiff_t""'");
  } 
  arg3 = static_cast< ptrdiff_t >(val3);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->dV(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::volume(static_cast< const meep::volume& >(result))), SWIGTYPE_p_meep__volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_dV__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::ivec *arg2 = 0 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  SwigValueWrapper< meep::volume > result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_dV", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_dV" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "grid_volume_dV" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_dV" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "grid_volume_dV" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->dV((meep::ivec const &)*arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::volume(static_cast< const meep::volume& >(result))), SWIGTYPE_p_meep__volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_dV__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::ivec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  SwigValueWrapper< meep::volume > result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_dV", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_dV" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "grid_volume_dV" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_dV" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->dV((meep::ivec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::volume(static_cast< const meep::volume& >(result))), SWIGTYPE_p_meep__volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_dV(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__grid_volume, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_grid_volume_dV__SWIG_2(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__grid_volume, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_grid_volume_dV__SWIG_1(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__grid_volume, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_grid_volume_dV__SWIG_0(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'grid_volume_dV'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::grid_volume::dV(meep::component,ptrdiff_t) const\n"
    "    meep::grid_volume::dV(meep::ivec const &,double) const\n"
    "    meep::grid_volume::dV(meep::ivec const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_grid_volume_intersect_with__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::grid_volume *arg2 = 0 ;
  meep::grid_volume *arg3 = (meep::grid_volume *) 0 ;
  meep::grid_volume *arg4 = (meep::grid_volume *) 0 ;
  int *arg5 = (int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_intersect_with", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_intersect_with" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "grid_volume_intersect_with" "', argument " "2"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_intersect_with" "', argument " "2"" of type '" "meep::grid_volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::grid_volume * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "grid_volume_intersect_with" "', argument " "3"" of type '" "meep::grid_volume *""'"); 
  }
  arg3 = reinterpret_cast< meep::grid_volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "grid_volume_intersect_with" "', argument " "4"" of type '" "meep::grid_volume *""'"); 
  }
  arg4 = reinterpret_cast< meep::grid_volume * >(argp4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "grid_volume_intersect_with" "', argument " "5"" of type '" "int *""'"); 
  }
  arg5 = reinterpret_cast< int * >(argp5);
  {
    try {
      result = (bool)((meep::grid_volume const *)arg1)->intersect_with((meep::grid_volume const &)*arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_intersect_with__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::grid_volume *arg2 = 0 ;
  meep::grid_volume *arg3 = (meep::grid_volume *) 0 ;
  meep::grid_volume *arg4 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_intersect_with", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_intersect_with" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "grid_volume_intersect_with" "', argument " "2"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_intersect_with" "', argument " "2"" of type '" "meep::grid_volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::grid_volume * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "grid_volume_intersect_with" "', argument " "3"" of type '" "meep::grid_volume *""'"); 
  }
  arg3 = reinterpret_cast< meep::grid_volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "grid_volume_intersect_with" "', argument " "4"" of type '" "meep::grid_volume *""'"); 
  }
  arg4 = reinterpret_cast< meep::grid_volume * >(argp4);
  {
    try {
      result = (bool)((meep::grid_volume const *)arg1)->intersect_with((meep::grid_volume const &)*arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_intersect_with__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::grid_volume *arg2 = 0 ;
  meep::grid_volume *arg3 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_intersect_with", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_intersect_with" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "grid_volume_intersect_with" "', argument " "2"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_intersect_with" "', argument " "2"" of type '" "meep::grid_volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::grid_volume * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "grid_volume_intersect_with" "', argument " "3"" of type '" "meep::grid_volume *""'"); 
  }
  arg3 = reinterpret_cast< meep::grid_volume * >(argp3);
  {
    try {
      result = (bool)((meep::grid_volume const *)arg1)->intersect_with((meep::grid_volume const &)*arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_intersect_with__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::grid_volume *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_intersect_with", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_intersect_with" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "grid_volume_intersect_with" "', argument " "2"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_intersect_with" "', argument " "2"" of type '" "meep::grid_volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::grid_volume * >(argp2);
  {
    try {
      result = (bool)((meep::grid_volume const *)arg1)->intersect_with((meep::grid_volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_intersect_with(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__grid_volume, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_grid_volume_intersect_with__SWIG_3(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__grid_volume, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__grid_volume, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_grid_volume_intersect_with__SWIG_2(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__grid_volume, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__grid_volume, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__grid_volume, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_grid_volume_intersect_with__SWIG_1(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__grid_volume, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__grid_volume, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__grid_volume, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_int, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_grid_volume_intersect_with__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'grid_volume_intersect_with'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::grid_volume::intersect_with(meep::grid_volume const &,meep::grid_volume *,meep::grid_volume *,int *) const\n"
    "    meep::grid_volume::intersect_with(meep::grid_volume const &,meep::grid_volume *,meep::grid_volume *) const\n"
    "    meep::grid_volume::intersect_with(meep::grid_volume const &,meep::grid_volume *) const\n"
    "    meep::grid_volume::intersect_with(meep::grid_volume const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_grid_volume_rmin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_rmin", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_rmin" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = (double)((meep::grid_volume const *)arg1)->rmin();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_rmax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_rmax", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_rmax" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = (double)((meep::grid_volume const *)arg1)->rmax();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_xmin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_xmin", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_xmin" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = (double)((meep::grid_volume const *)arg1)->xmin();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_xmax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_xmax", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_xmax" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = (double)((meep::grid_volume const *)arg1)->xmax();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_ymin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_ymin", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_ymin" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = (double)((meep::grid_volume const *)arg1)->ymin();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_ymax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_ymax", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_ymax" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = (double)((meep::grid_volume const *)arg1)->ymax();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_zmin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_zmin", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_zmin" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = (double)((meep::grid_volume const *)arg1)->zmin();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_zmax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_zmax", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_zmax" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = (double)((meep::grid_volume const *)arg1)->zmax();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_center(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_center", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_center" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->center();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_icenter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_icenter", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_icenter" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->icenter();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_loc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::component arg2 ;
  ptrdiff_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_loc", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_loc" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "grid_volume_loc" "', argument " "3"" of type '" "ptrdiff_t""'");
  } 
  arg3 = static_cast< ptrdiff_t >(val3);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->loc(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_loc_at_resolution(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  ptrdiff_t arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_loc_at_resolution", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_loc_at_resolution" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grid_volume_loc_at_resolution" "', argument " "2"" of type '" "ptrdiff_t""'");
  } 
  arg2 = static_cast< ptrdiff_t >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "grid_volume_loc_at_resolution" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->loc_at_resolution(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_ntot_at_resolution(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  size_t result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_ntot_at_resolution", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_ntot_at_resolution" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grid_volume_ntot_at_resolution" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->ntot_at_resolution(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_iloc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::component arg2 ;
  ptrdiff_t arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_iloc", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_iloc" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "grid_volume_iloc" "', argument " "3"" of type '" "ptrdiff_t""'");
  } 
  arg3 = static_cast< ptrdiff_t >(val3);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->iloc(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_surface_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  size_t result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_surface_area", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_surface_area" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->surface_area();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_yee_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::component arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  ptrdiff_t result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_yee_index", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_yee_index" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    try {
      result = ((meep::grid_volume const *)arg1)->yee_index(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_yee_shift(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::component arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_yee_shift", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_yee_shift" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    try {
      result = ((meep::grid_volume const *)arg1)->yee_shift(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_eps_component(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::component result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_eps_component", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_eps_component" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = (meep::component)((meep::grid_volume const *)arg1)->eps_component();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_yee2cent_offsets(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::component arg2 ;
  ptrdiff_t *arg3 = 0 ;
  ptrdiff_t *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_yee2cent_offsets", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_yee2cent_offsets" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_ptrdiff_t,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "grid_volume_yee2cent_offsets" "', argument " "3"" of type '" "ptrdiff_t &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_yee2cent_offsets" "', argument " "3"" of type '" "ptrdiff_t &""'"); 
  }
  arg3 = reinterpret_cast< ptrdiff_t * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_ptrdiff_t,  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "grid_volume_yee2cent_offsets" "', argument " "4"" of type '" "ptrdiff_t &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_yee2cent_offsets" "', argument " "4"" of type '" "ptrdiff_t &""'"); 
  }
  arg4 = reinterpret_cast< ptrdiff_t * >(argp4);
  {
    try {
      ((meep::grid_volume const *)arg1)->yee2cent_offsets(arg2,*arg3,*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_cent2yee_offsets(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::component arg2 ;
  ptrdiff_t *arg3 = 0 ;
  ptrdiff_t *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_cent2yee_offsets", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_cent2yee_offsets" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_ptrdiff_t,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "grid_volume_cent2yee_offsets" "', argument " "3"" of type '" "ptrdiff_t &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_cent2yee_offsets" "', argument " "3"" of type '" "ptrdiff_t &""'"); 
  }
  arg3 = reinterpret_cast< ptrdiff_t * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_ptrdiff_t,  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "grid_volume_cent2yee_offsets" "', argument " "4"" of type '" "ptrdiff_t &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_cent2yee_offsets" "', argument " "4"" of type '" "ptrdiff_t &""'"); 
  }
  arg4 = reinterpret_cast< ptrdiff_t * >(argp4);
  {
    try {
      ((meep::grid_volume const *)arg1)->cent2yee_offsets(arg2,*arg3,*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_boundary_location(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::boundary_side arg2 ;
  meep::direction arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_boundary_location", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_boundary_location" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grid_volume_boundary_location" "', argument " "2"" of type '" "meep::boundary_side""'");
  } 
  arg2 = static_cast< meep::boundary_side >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "grid_volume_boundary_location" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  {
    try {
      result = (double)((meep::grid_volume const *)arg1)->boundary_location(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_big_corner(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_big_corner", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_big_corner" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->big_corner();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_little_corner(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_little_corner", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_little_corner" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->little_corner();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_corner(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::boundary_side arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_corner", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_corner" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grid_volume_corner" "', argument " "2"" of type '" "meep::boundary_side""'");
  } 
  arg2 = static_cast< meep::boundary_side >(val2);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->corner(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_contains__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_contains", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_contains" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "grid_volume_contains" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_contains" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = (bool)((meep::grid_volume const *)arg1)->contains((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_contains__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::ivec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_contains", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_contains" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "grid_volume_contains" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_contains" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  {
    try {
      result = (bool)((meep::grid_volume const *)arg1)->contains((meep::ivec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_contains(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__grid_volume, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_grid_volume_contains__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__grid_volume, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_grid_volume_contains__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'grid_volume_contains'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::grid_volume::contains(meep::vec const &) const\n"
    "    meep::grid_volume::contains(meep::ivec const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_grid_volume_little_owned_corner0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::component arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_little_owned_corner0", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_little_owned_corner0" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    try {
      result = ((meep::grid_volume const *)arg1)->little_owned_corner0(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_little_owned_corner(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::component arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_little_owned_corner", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_little_owned_corner" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    try {
      result = ((meep::grid_volume const *)arg1)->little_owned_corner(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_big_owned_corner(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::component arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_big_owned_corner", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_big_owned_corner" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    try {
      result = ((meep::grid_volume const *)arg1)->big_owned_corner(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_owns(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::ivec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_owns", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_owns" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "grid_volume_owns" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_owns" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  {
    try {
      result = (bool)((meep::grid_volume const *)arg1)->owns((meep::ivec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_surroundings(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  SwigValueWrapper< meep::volume > result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_surroundings", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_surroundings" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->surroundings();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::volume(static_cast< const meep::volume& >(result))), SWIGTYPE_p_meep__volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_interior(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  SwigValueWrapper< meep::volume > result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_interior", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_interior" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->interior();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::volume(static_cast< const meep::volume& >(result))), SWIGTYPE_p_meep__volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_get_boundary_icorners(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::component arg2 ;
  int arg3 ;
  meep::ivec *arg4 = (meep::ivec *) 0 ;
  meep::ivec *arg5 = (meep::ivec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_get_boundary_icorners", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_get_boundary_icorners" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "grid_volume_get_boundary_icorners" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "grid_volume_get_boundary_icorners" "', argument " "4"" of type '" "meep::ivec *""'"); 
  }
  arg4 = reinterpret_cast< meep::ivec * >(argp4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "grid_volume_get_boundary_icorners" "', argument " "5"" of type '" "meep::ivec *""'"); 
  }
  arg5 = reinterpret_cast< meep::ivec * >(argp5);
  {
    try {
      result = (bool)((meep::grid_volume const *)arg1)->get_boundary_icorners(arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_split_at_fraction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  bool arg2 ;
  int arg3 ;
  int arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::grid_volume result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_split_at_fraction", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_split_at_fraction" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  ecode2 = SWIG_AsVal_bool(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grid_volume_split_at_fraction" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "grid_volume_split_at_fraction" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "grid_volume_split_at_fraction" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->split_at_fraction(arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::grid_volume(static_cast< const meep::grid_volume& >(result))), SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_get_cost(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_get_cost", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_get_cost" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = (double)((meep::grid_volume const *)arg1)->get_cost();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_halve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::direction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::grid_volume result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_halve", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_halve" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grid_volume_halve" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->halve(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::grid_volume(static_cast< const meep::grid_volume& >(result))), SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_pad_self(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::direction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_pad_self", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_pad_self" "', argument " "1"" of type '" "meep::grid_volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grid_volume_pad_self" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  {
    try {
      (arg1)->pad_self(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_pad__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::direction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::grid_volume result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_pad", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_pad" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grid_volume_pad" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->pad(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::grid_volume(static_cast< const meep::grid_volume& >(result))), SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_pad__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::grid_volume result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_pad", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_pad" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->pad();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::grid_volume(static_cast< const meep::grid_volume& >(result))), SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_pad(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__grid_volume, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_grid_volume_pad__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__grid_volume, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_grid_volume_pad__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'grid_volume_pad'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::grid_volume::pad(meep::direction) const\n"
    "    meep::grid_volume::pad() const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_grid_volume_iyee_shift(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::component arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_iyee_shift", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_iyee_shift" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    try {
      result = ((meep::grid_volume const *)arg1)->iyee_shift(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_get_origin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_get_origin", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_get_origin" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->get_origin();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_set_origin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_set_origin", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_set_origin" "', argument " "1"" of type '" "meep::grid_volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "grid_volume_set_origin" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_set_origin" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      (arg1)->set_origin((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_set_origin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::ivec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_set_origin", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_set_origin" "', argument " "1"" of type '" "meep::grid_volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "grid_volume_set_origin" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_set_origin" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  {
    try {
      (arg1)->set_origin((meep::ivec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_shift_origin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_shift_origin", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_shift_origin" "', argument " "1"" of type '" "meep::grid_volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "grid_volume_shift_origin" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_shift_origin" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      (arg1)->shift_origin((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_shift_origin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::ivec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_shift_origin", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_shift_origin" "', argument " "1"" of type '" "meep::grid_volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "grid_volume_shift_origin" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_shift_origin" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  {
    try {
      (arg1)->shift_origin((meep::ivec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_shift_origin__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::direction arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_shift_origin", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_shift_origin" "', argument " "1"" of type '" "meep::grid_volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grid_volume_shift_origin" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "grid_volume_shift_origin" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      (arg1)->shift_origin(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_shift_origin(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__grid_volume, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_grid_volume_shift_origin__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__grid_volume, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_grid_volume_shift_origin__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__grid_volume, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_grid_volume_shift_origin__SWIG_2(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'grid_volume_shift_origin'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::grid_volume::shift_origin(meep::vec const &)\n"
    "    meep::grid_volume::shift_origin(meep::ivec const &)\n"
    "    meep::grid_volume::shift_origin(meep::direction,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_grid_volume_set_origin__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::direction arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_set_origin", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_set_origin" "', argument " "1"" of type '" "meep::grid_volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grid_volume_set_origin" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "grid_volume_set_origin" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      (arg1)->set_origin(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_set_origin(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__grid_volume, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_grid_volume_set_origin__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__grid_volume, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_grid_volume_set_origin__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__grid_volume, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_grid_volume_set_origin__SWIG_2(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'grid_volume_set_origin'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::grid_volume::set_origin(meep::vec const &)\n"
    "    meep::grid_volume::set_origin(meep::ivec const &)\n"
    "    meep::grid_volume::set_origin(meep::direction,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_grid_volume_center_origin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_center_origin", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_center_origin" "', argument " "1"" of type '" "meep::grid_volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      (arg1)->center_origin();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_origin_in_direction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::direction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_origin_in_direction", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_origin_in_direction" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grid_volume_origin_in_direction" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  {
    try {
      result = (double)((meep::grid_volume const *)arg1)->origin_in_direction(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_iorigin_in_direction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::direction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_iorigin_in_direction", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_iorigin_in_direction" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grid_volume_iorigin_in_direction" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  {
    try {
      result = (int)((meep::grid_volume const *)arg1)->iorigin_in_direction(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_origin_r(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_origin_r", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_origin_r" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = (double)((meep::grid_volume const *)arg1)->origin_r();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_origin_x(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_origin_x", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_origin_x" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = (double)((meep::grid_volume const *)arg1)->origin_x();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_origin_y(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_origin_y", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_origin_y" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = (double)((meep::grid_volume const *)arg1)->origin_y();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_origin_z(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_origin_z", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_origin_z" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = (double)((meep::grid_volume const *)arg1)->origin_z();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_get_split_costs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  meep::direction arg2 ;
  int arg3 ;
  bool arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_get_split_costs", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_get_split_costs" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grid_volume_get_split_costs" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "grid_volume_get_split_costs" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "grid_volume_get_split_costs" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  {
    try {
      result = ((meep::grid_volume const *)arg1)->get_split_costs(arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_tile_split(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  int *arg2 = 0 ;
  meep::direction *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_tile_split", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_tile_split" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_int,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "grid_volume_tile_split" "', argument " "2"" of type '" "int &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_tile_split" "', argument " "2"" of type '" "int &""'"); 
  }
  arg2 = reinterpret_cast< int * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__direction,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "grid_volume_tile_split" "', argument " "3"" of type '" "meep::direction &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_tile_split" "', argument " "3"" of type '" "meep::direction &""'"); 
  }
  arg3 = reinterpret_cast< meep::direction * >(argp3);
  {
    try {
      ((meep::grid_volume const *)arg1)->tile_split(*arg2,*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume_find_best_split(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  int arg2 ;
  bool arg3 ;
  int *arg4 = 0 ;
  meep::direction *arg5 = 0 ;
  double *arg6 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "grid_volume_find_best_split", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume_find_best_split" "', argument " "1"" of type '" "meep::grid_volume const *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "grid_volume_find_best_split" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "grid_volume_find_best_split" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_int,  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "grid_volume_find_best_split" "', argument " "4"" of type '" "int &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_find_best_split" "', argument " "4"" of type '" "int &""'"); 
  }
  arg4 = reinterpret_cast< int * >(argp4);
  res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__direction,  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "grid_volume_find_best_split" "', argument " "5"" of type '" "meep::direction &""'"); 
  }
  if (!argp5) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_find_best_split" "', argument " "5"" of type '" "meep::direction &""'"); 
  }
  arg5 = reinterpret_cast< meep::direction * >(argp5);
  res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_double,  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "grid_volume_find_best_split" "', argument " "6"" of type '" "double &""'"); 
  }
  if (!argp6) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "grid_volume_find_best_split" "', argument " "6"" of type '" "double &""'"); 
  }
  arg6 = reinterpret_cast< double * >(argp6);
  {
    try {
      ((meep::grid_volume const *)arg1)->find_best_split(arg2,arg3,*arg4,*arg5,*arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_grid_volume___repr__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "grid_volume___repr__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "grid_volume___repr__" "', argument " "1"" of type '" "meep::grid_volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      result = (char *)meep_grid_volume___repr__(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_grid_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_grid_volume", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_grid_volume" "', argument " "1"" of type '" "meep::grid_volume *""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *grid_volume_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__grid_volume, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *grid_volume_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_identity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry result;
  
  if (!PyArg_UnpackTuple(args, "identity", 0, 0)) SWIG_fail;
  {
    try {
      result = meep::identity();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::symmetry(static_cast< const meep::symmetry& >(result))), SWIGTYPE_p_meep__symmetry, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_rotate4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::direction arg1 ;
  meep::grid_volume *arg2 = 0 ;
  int val1 ;
  int ecode1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::symmetry result;
  
  if (!PyArg_UnpackTuple(args, "rotate4", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "rotate4" "', argument " "1"" of type '" "meep::direction""'");
  } 
  arg1 = static_cast< meep::direction >(val1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rotate4" "', argument " "2"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "rotate4" "', argument " "2"" of type '" "meep::grid_volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::grid_volume * >(argp2);
  {
    try {
      result = meep::rotate4(arg1,(meep::grid_volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::symmetry(static_cast< const meep::symmetry& >(result))), SWIGTYPE_p_meep__symmetry, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_rotate2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::direction arg1 ;
  meep::grid_volume *arg2 = 0 ;
  int val1 ;
  int ecode1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::symmetry result;
  
  if (!PyArg_UnpackTuple(args, "rotate2", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "rotate2" "', argument " "1"" of type '" "meep::direction""'");
  } 
  arg1 = static_cast< meep::direction >(val1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rotate2" "', argument " "2"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "rotate2" "', argument " "2"" of type '" "meep::grid_volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::grid_volume * >(argp2);
  {
    try {
      result = meep::rotate2(arg1,(meep::grid_volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::symmetry(static_cast< const meep::symmetry& >(result))), SWIGTYPE_p_meep__symmetry, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_mirror(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::direction arg1 ;
  meep::grid_volume *arg2 = 0 ;
  int val1 ;
  int ecode1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::symmetry result;
  
  if (!PyArg_UnpackTuple(args, "mirror", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "mirror" "', argument " "1"" of type '" "meep::direction""'");
  } 
  arg1 = static_cast< meep::direction >(val1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "mirror" "', argument " "2"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "mirror" "', argument " "2"" of type '" "meep::grid_volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::grid_volume * >(argp2);
  {
    try {
      result = meep::mirror(arg1,(meep::grid_volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::symmetry(static_cast< const meep::symmetry& >(result))), SWIGTYPE_p_meep__symmetry, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_r_to_minus_r_symmetry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::symmetry result;
  
  if (!PyArg_UnpackTuple(args, "r_to_minus_r_symmetry", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "r_to_minus_r_symmetry" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  {
    try {
      result = meep::r_to_minus_r_symmetry(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::symmetry(static_cast< const meep::symmetry& >(result))), SWIGTYPE_p_meep__symmetry, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_symmetry__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_symmetry", 0, 0)) SWIG_fail;
  {
    try {
      result = (meep::symmetry *)new meep::symmetry();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__symmetry, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_symmetry__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::symmetry *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_symmetry", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__symmetry,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_symmetry" "', argument " "1"" of type '" "meep::symmetry const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_symmetry" "', argument " "1"" of type '" "meep::symmetry const &""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  {
    try {
      result = (meep::symmetry *)new meep::symmetry((meep::symmetry const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__symmetry, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_symmetry(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[2] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_symmetry__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__symmetry, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_symmetry__SWIG_1(self, args);
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_symmetry'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::symmetry::symmetry()\n"
    "    meep::symmetry::symmetry(meep::symmetry const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_symmetry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = (meep::symmetry *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_symmetry", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__symmetry, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_symmetry" "', argument " "1"" of type '" "meep::symmetry *""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symmetry_transform__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = (meep::symmetry *) 0 ;
  meep::direction arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::signed_direction result;
  
  if (!PyArg_UnpackTuple(args, "symmetry_transform", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symmetry_transform" "', argument " "1"" of type '" "meep::symmetry const *""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "symmetry_transform" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "symmetry_transform" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      result = ((meep::symmetry const *)arg1)->transform(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::signed_direction(static_cast< const meep::signed_direction& >(result))), SWIGTYPE_p_meep__signed_direction, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symmetry_transform__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = (meep::symmetry *) 0 ;
  meep::ivec *arg2 = 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "symmetry_transform", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symmetry_transform" "', argument " "1"" of type '" "meep::symmetry const *""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "symmetry_transform" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "symmetry_transform" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "symmetry_transform" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      result = ((meep::symmetry const *)arg1)->transform((meep::ivec const &)*arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symmetry_transform__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = (meep::symmetry *) 0 ;
  meep::vec *arg2 = 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "symmetry_transform", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symmetry_transform" "', argument " "1"" of type '" "meep::symmetry const *""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "symmetry_transform" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "symmetry_transform" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "symmetry_transform" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      result = ((meep::symmetry const *)arg1)->transform((meep::vec const &)*arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symmetry_transform_unshifted(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = (meep::symmetry *) 0 ;
  meep::ivec *arg2 = 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "symmetry_transform_unshifted", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symmetry_transform_unshifted" "', argument " "1"" of type '" "meep::symmetry const *""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "symmetry_transform_unshifted" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "symmetry_transform_unshifted" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "symmetry_transform_unshifted" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      result = ((meep::symmetry const *)arg1)->transform_unshifted((meep::ivec const &)*arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symmetry_transform__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = (meep::symmetry *) 0 ;
  meep::volume *arg2 = 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  SwigValueWrapper< meep::volume > result;
  
  if (!PyArg_UnpackTuple(args, "symmetry_transform", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symmetry_transform" "', argument " "1"" of type '" "meep::symmetry const *""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "symmetry_transform" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "symmetry_transform" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "symmetry_transform" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      result = ((meep::symmetry const *)arg1)->transform((meep::volume const &)*arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::volume(static_cast< const meep::volume& >(result))), SWIGTYPE_p_meep__volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symmetry_transform__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = (meep::symmetry *) 0 ;
  meep::component arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::component result;
  
  if (!PyArg_UnpackTuple(args, "symmetry_transform", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symmetry_transform" "', argument " "1"" of type '" "meep::symmetry const *""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "symmetry_transform" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      result = (meep::component)((meep::symmetry const *)arg1)->transform(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symmetry_phase_shift__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = (meep::symmetry *) 0 ;
  meep::component arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "symmetry_phase_shift", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symmetry_phase_shift" "', argument " "1"" of type '" "meep::symmetry const *""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "symmetry_phase_shift" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      result = ((meep::symmetry const *)arg1)->phase_shift(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symmetry_transform__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = (meep::symmetry *) 0 ;
  meep::derived_component arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::derived_component result;
  
  if (!PyArg_UnpackTuple(args, "symmetry_transform", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symmetry_transform" "', argument " "1"" of type '" "meep::symmetry const *""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  {
    arg2 = static_cast<meep::derived_component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "symmetry_transform" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      result = (meep::derived_component)((meep::symmetry const *)arg1)->transform(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symmetry_phase_shift__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = (meep::symmetry *) 0 ;
  meep::derived_component arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "symmetry_phase_shift", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symmetry_phase_shift" "', argument " "1"" of type '" "meep::symmetry const *""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  {
    arg2 = static_cast<meep::derived_component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "symmetry_phase_shift" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      result = ((meep::symmetry const *)arg1)->phase_shift(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symmetry_transform__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = (meep::symmetry *) 0 ;
  int arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "symmetry_transform", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symmetry_transform" "', argument " "1"" of type '" "meep::symmetry const *""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "symmetry_transform" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "symmetry_transform" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      result = (int)((meep::symmetry const *)arg1)->transform(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symmetry_transform(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__symmetry, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_symmetry_transform__SWIG_1(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__symmetry, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_symmetry_transform__SWIG_2(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__symmetry, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_symmetry_transform__SWIG_3(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__symmetry, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_symmetry_transform__SWIG_4(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__symmetry, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) >= 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_symmetry_transform__SWIG_5(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__symmetry, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_symmetry_transform__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__symmetry, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_symmetry_transform__SWIG_6(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'symmetry_transform'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::symmetry::transform(meep::direction,int) const\n"
    "    meep::symmetry::transform(meep::ivec const &,int) const\n"
    "    meep::symmetry::transform(meep::vec const &,int) const\n"
    "    meep::symmetry::transform(meep::volume const &,int) const\n"
    "    meep::symmetry::transform(meep::component,int) const\n"
    "    meep::symmetry::transform(meep::derived_component,int) const\n"
    "    meep::symmetry::transform(int,int) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_symmetry_phase_shift__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = (meep::symmetry *) 0 ;
  int arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "symmetry_phase_shift", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symmetry_phase_shift" "', argument " "1"" of type '" "meep::symmetry const *""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "symmetry_phase_shift" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "symmetry_phase_shift" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      result = ((meep::symmetry const *)arg1)->phase_shift(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symmetry_phase_shift(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__symmetry, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_symmetry_phase_shift__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__symmetry, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) >= 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_symmetry_phase_shift__SWIG_1(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__symmetry, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_symmetry_phase_shift__SWIG_2(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'symmetry_phase_shift'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::symmetry::phase_shift(meep::component,int) const\n"
    "    meep::symmetry::phase_shift(meep::derived_component,int) const\n"
    "    meep::symmetry::phase_shift(int,int) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_symmetry_multiplicity__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = (meep::symmetry *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "symmetry_multiplicity", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symmetry_multiplicity" "', argument " "1"" of type '" "meep::symmetry const *""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  {
    try {
      result = (int)((meep::symmetry const *)arg1)->multiplicity();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symmetry_multiplicity__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = (meep::symmetry *) 0 ;
  meep::ivec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "symmetry_multiplicity", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symmetry_multiplicity" "', argument " "1"" of type '" "meep::symmetry const *""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "symmetry_multiplicity" "', argument " "2"" of type '" "meep::ivec &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "symmetry_multiplicity" "', argument " "2"" of type '" "meep::ivec &""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  {
    try {
      result = (int)((meep::symmetry const *)arg1)->multiplicity(*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symmetry_multiplicity(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__symmetry, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_symmetry_multiplicity__SWIG_0(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__symmetry, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_symmetry_multiplicity__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'symmetry_multiplicity'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::symmetry::multiplicity() const\n"
    "    meep::symmetry::multiplicity(meep::ivec &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_symmetry_is_primitive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = (meep::symmetry *) 0 ;
  meep::ivec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "symmetry_is_primitive", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symmetry_is_primitive" "', argument " "1"" of type '" "meep::symmetry const *""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "symmetry_is_primitive" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "symmetry_is_primitive" "', argument " "2"" of type '" "meep::ivec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  {
    try {
      result = (bool)((meep::symmetry const *)arg1)->is_primitive((meep::ivec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symmetry_symmetry_reduce(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = (meep::symmetry *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::volume_list *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "symmetry_symmetry_reduce", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symmetry_symmetry_reduce" "', argument " "1"" of type '" "meep::symmetry const *""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "symmetry_symmetry_reduce" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  {
    try {
      result = (meep::volume_list *)((meep::symmetry const *)arg1)->reduce((meep::volume_list const *)arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__volume_list, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symmetry___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = (meep::symmetry *) 0 ;
  meep::symmetry *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::symmetry result;
  
  if (!PyArg_UnpackTuple(args, "symmetry___add__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symmetry___add__" "', argument " "1"" of type '" "meep::symmetry const *""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__symmetry,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "symmetry___add__" "', argument " "2"" of type '" "meep::symmetry const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "symmetry___add__" "', argument " "2"" of type '" "meep::symmetry const &""'"); 
  }
  arg2 = reinterpret_cast< meep::symmetry * >(argp2);
  {
    try {
      result = ((meep::symmetry const *)arg1)->operator +((meep::symmetry const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::symmetry(static_cast< const meep::symmetry& >(result))), SWIGTYPE_p_meep__symmetry, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_symmetry___mul__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = (meep::symmetry *) 0 ;
  std::complex< double > arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::complex< double > val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::symmetry result;
  
  if (!PyArg_UnpackTuple(args, "symmetry___mul__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symmetry___mul__" "', argument " "1"" of type '" "meep::symmetry const *""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "symmetry___mul__" "', argument " "2"" of type '" "std::complex< double >""'");
  } 
  arg2 = static_cast< std::complex< double > >(val2);
  {
    try {
      result = ((meep::symmetry const *)arg1)->operator *(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::symmetry(static_cast< const meep::symmetry& >(result))), SWIGTYPE_p_meep__symmetry, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_symmetry___sub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = (meep::symmetry *) 0 ;
  meep::symmetry *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::symmetry result;
  
  if (!PyArg_UnpackTuple(args, "symmetry___sub__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symmetry___sub__" "', argument " "1"" of type '" "meep::symmetry const *""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__symmetry,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "symmetry___sub__" "', argument " "2"" of type '" "meep::symmetry const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "symmetry___sub__" "', argument " "2"" of type '" "meep::symmetry const &""'"); 
  }
  arg2 = reinterpret_cast< meep::symmetry * >(argp2);
  {
    try {
      result = ((meep::symmetry const *)arg1)->operator -((meep::symmetry const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::symmetry(static_cast< const meep::symmetry& >(result))), SWIGTYPE_p_meep__symmetry, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_symmetry___neg__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = (meep::symmetry *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::symmetry result;
  
  if (!PyArg_UnpackTuple(args, "symmetry___neg__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symmetry___neg__" "', argument " "1"" of type '" "meep::symmetry const *""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  {
    try {
      result = ((meep::symmetry const *)arg1)->operator -();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::symmetry(static_cast< const meep::symmetry& >(result))), SWIGTYPE_p_meep__symmetry, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_symmetry_symmetry_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = (meep::symmetry *) 0 ;
  meep::symmetry *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "symmetry_symmetry_assign", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symmetry_symmetry_assign" "', argument " "1"" of type '" "meep::symmetry *""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__symmetry,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "symmetry_symmetry_assign" "', argument " "2"" of type '" "meep::symmetry const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "symmetry_symmetry_assign" "', argument " "2"" of type '" "meep::symmetry const &""'"); 
  }
  arg2 = reinterpret_cast< meep::symmetry * >(argp2);
  {
    try {
      (arg1)->operator =((meep::symmetry const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symmetry___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = (meep::symmetry *) 0 ;
  meep::symmetry *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "symmetry___eq__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symmetry___eq__" "', argument " "1"" of type '" "meep::symmetry const *""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__symmetry,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "symmetry___eq__" "', argument " "2"" of type '" "meep::symmetry const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "symmetry___eq__" "', argument " "2"" of type '" "meep::symmetry const &""'"); 
  }
  arg2 = reinterpret_cast< meep::symmetry * >(argp2);
  {
    try {
      result = (bool)((meep::symmetry const *)arg1)->operator ==((meep::symmetry const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_symmetry___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = (meep::symmetry *) 0 ;
  meep::symmetry *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "symmetry___ne__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symmetry___ne__" "', argument " "1"" of type '" "meep::symmetry const *""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__symmetry,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "symmetry___ne__" "', argument " "2"" of type '" "meep::symmetry const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "symmetry___ne__" "', argument " "2"" of type '" "meep::symmetry const &""'"); 
  }
  arg2 = reinterpret_cast< meep::symmetry * >(argp2);
  {
    try {
      result = (bool)((meep::symmetry const *)arg1)->operator !=((meep::symmetry const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_symmetry_i_symmetry_point_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = (meep::symmetry *) 0 ;
  meep::ivec *arg2 = (meep::ivec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "symmetry_i_symmetry_point_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symmetry_i_symmetry_point_set" "', argument " "1"" of type '" "meep::symmetry *""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "symmetry_i_symmetry_point_set" "', argument " "2"" of type '" "meep::ivec *""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  if (arg1) (arg1)->i_symmetry_point = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symmetry_i_symmetry_point_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::symmetry *arg1 = (meep::symmetry *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::ivec *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "symmetry_i_symmetry_point_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symmetry_i_symmetry_point_get" "', argument " "1"" of type '" "meep::symmetry *""'"); 
  }
  arg1 = reinterpret_cast< meep::symmetry * >(argp1);
  result = (meep::ivec *)& ((arg1)->i_symmetry_point);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__ivec, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *symmetry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__symmetry, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *symmetry_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_volume_list__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = 0 ;
  int arg2 ;
  std::complex< double > arg3 ;
  meep::volume_list *arg4 = (meep::volume_list *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  std::complex< double > val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::volume_list *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_volume_list", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_volume_list" "', argument " "1"" of type '" "meep::volume const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_volume_list" "', argument " "1"" of type '" "meep::volume const &""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_volume_list" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_volume_list" "', argument " "3"" of type '" "std::complex< double >""'");
  } 
  arg3 = static_cast< std::complex< double > >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_volume_list" "', argument " "4"" of type '" "meep::volume_list *""'"); 
  }
  arg4 = reinterpret_cast< meep::volume_list * >(argp4);
  {
    try {
      result = (meep::volume_list *)new meep::volume_list((meep::volume const &)*arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__volume_list, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_volume_list__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = 0 ;
  int arg2 ;
  std::complex< double > arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  std::complex< double > val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::volume_list *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_volume_list", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_volume_list" "', argument " "1"" of type '" "meep::volume const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_volume_list" "', argument " "1"" of type '" "meep::volume const &""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_volume_list" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_volume_list" "', argument " "3"" of type '" "std::complex< double >""'");
  } 
  arg3 = static_cast< std::complex< double > >(val3);
  {
    try {
      result = (meep::volume_list *)new meep::volume_list((meep::volume const &)*arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__volume_list, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_volume_list__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::volume_list *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_volume_list", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_volume_list" "', argument " "1"" of type '" "meep::volume const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_volume_list" "', argument " "1"" of type '" "meep::volume const &""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_volume_list" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      result = (meep::volume_list *)new meep::volume_list((meep::volume const &)*arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__volume_list, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_volume_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume_list *arg1 = (meep::volume_list *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_volume_list", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume_list, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_volume_list" "', argument " "1"" of type '" "meep::volume_list *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume_list * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_volume_list__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume_list *arg1 = (meep::volume_list *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::volume_list *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_volume_list", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_volume_list" "', argument " "1"" of type '" "meep::volume_list const *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume_list * >(argp1);
  {
    try {
      result = (meep::volume_list *)new meep::volume_list((meep::volume_list const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__volume_list, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_volume_list(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__volume_list, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_volume_list__SWIG_3(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_volume_list__SWIG_2(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new_volume_list__SWIG_1(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__volume_list, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_new_volume_list__SWIG_0(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_volume_list'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::volume_list::volume_list(meep::volume const &,int,std::complex< double >,meep::volume_list *)\n"
    "    meep::volume_list::volume_list(meep::volume const &,int,std::complex< double >)\n"
    "    meep::volume_list::volume_list(meep::volume const &,int)\n"
    "    meep::volume_list::volume_list(meep::volume_list const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_volume_list_v_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume_list *arg1 = (meep::volume_list *) 0 ;
  meep::volume *arg2 = (meep::volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "volume_list_v_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_list_v_set" "', argument " "1"" of type '" "meep::volume_list *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume_list * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "volume_list_v_set" "', argument " "2"" of type '" "meep::volume *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  if (arg1) (arg1)->v = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume_list_v_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume_list *arg1 = (meep::volume_list *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::volume *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "volume_list_v_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_list_v_get" "', argument " "1"" of type '" "meep::volume_list *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume_list * >(argp1);
  result = (meep::volume *)& ((arg1)->v);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__volume, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume_list_c_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume_list *arg1 = (meep::volume_list *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "volume_list_c_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_list_c_set" "', argument " "1"" of type '" "meep::volume_list *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume_list * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "volume_list_c_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  if (arg1) (arg1)->c = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume_list_c_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume_list *arg1 = (meep::volume_list *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "volume_list_c_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_list_c_get" "', argument " "1"" of type '" "meep::volume_list *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume_list * >(argp1);
  result = (int) ((arg1)->c);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume_list_weight_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume_list *arg1 = (meep::volume_list *) 0 ;
  std::complex< double > *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::complex< double > temp2 ;
  std::complex< double > val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "volume_list_weight_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_list_weight_set" "', argument " "1"" of type '" "meep::volume_list *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume_list * >(argp1);
  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "volume_list_weight_set" "', argument " "2"" of type '" "std::complex< double >""'");
  } 
  temp2 = static_cast< std::complex< double > >(val2);
  arg2 = &temp2;
  if (arg1) (arg1)->weight = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume_list_weight_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume_list *arg1 = (meep::volume_list *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::complex< double > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "volume_list_weight_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_list_weight_get" "', argument " "1"" of type '" "meep::volume_list *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume_list * >(argp1);
  result = (std::complex< double > *) & ((arg1)->weight);
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(*result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume_list_next_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume_list *arg1 = (meep::volume_list *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "volume_list_next_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_list_next_set" "', argument " "1"" of type '" "meep::volume_list *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume_list * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "volume_list_next_set" "', argument " "2"" of type '" "meep::volume_list *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  if (arg1) (arg1)->next = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_volume_list_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume_list *arg1 = (meep::volume_list *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::volume_list *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "volume_list_next_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "volume_list_next_get" "', argument " "1"" of type '" "meep::volume_list *""'"); 
  }
  arg1 = reinterpret_cast< meep::volume_list * >(argp1);
  result = (meep::volume_list *) ((arg1)->next);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__volume_list, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *volume_list_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__volume_list, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *volume_list_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN int Swig_var_verbosity_set(PyObject *_val) {
  {
    int val;
    int res = SWIG_AsVal_int(_val, &val);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""meep::verbosity""' of type '""int""'");
    }
    meep::verbosity = static_cast< int >(val);
  }
  return 0;
fail:
  return 1;
}


SWIGINTERN PyObject *Swig_var_verbosity_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_From_int(static_cast< int >(meep::verbosity));
  return pyobj;
}


SWIGINTERN int Swig_var_pi_set(PyObject *) {
  SWIG_Error(SWIG_AttributeError,"Variable pi is read-only.");
  return 1;
}


SWIGINTERN PyObject *Swig_var_pi_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_From_double(static_cast< double >(meep::pi));
  return pyobj;
}


SWIGINTERN int Swig_var_nan_set(PyObject *) {
  SWIG_Error(SWIG_AttributeError,"Variable nan is read-only.");
  return 1;
}


SWIGINTERN PyObject *Swig_var_nan_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_From_double(static_cast< double >(meep::nan));
  return pyobj;
}


SWIGINTERN PyObject *_wrap_cdouble__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< float > arg1 ;
  std::complex< float > val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "cdouble", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_std_complex_Sl_float_Sg_(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cdouble" "', argument " "1"" of type '" "std::complex< float >""'");
  } 
  arg1 = static_cast< std::complex< float > >(val1);
  {
    try {
      result = meep::cdouble(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_cdouble__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< double > arg1 ;
  std::complex< double > val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "cdouble", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cdouble" "', argument " "1"" of type '" "std::complex< double >""'");
  } 
  arg1 = static_cast< std::complex< double > >(val1);
  {
    try {
      result = meep::cdouble(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_cdouble(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[2] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_std_complex_Sl_float_Sg_(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_cdouble__SWIG_0(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_cdouble__SWIG_1(self, args);
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'cdouble'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::cdouble(std::complex< float >)\n"
    "    meep::cdouble(std::complex< double >)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_matrix_invert(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< double > (*arg1)[9] = 0 ;
  std::complex< double > (*arg2)[9] = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "matrix_invert", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_a_9__std__complexT_double_t,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "matrix_invert" "', argument " "1"" of type '" "std::complex< double > (&)[9]""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "matrix_invert" "', argument " "1"" of type '" "std::complex< double > (&)[9]""'"); 
  }
  arg1 = reinterpret_cast< std::complex< double > (*)[9] >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_a_9__std__complexT_double_t,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "matrix_invert" "', argument " "2"" of type '" "std::complex< double > (&)[9]""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "matrix_invert" "', argument " "2"" of type '" "std::complex< double > (&)[9]""'"); 
  }
  arg2 = reinterpret_cast< std::complex< double > (*)[9] >(argp2);
  {
    try {
      meep::matrix_invert((std::complex< double > (&)[9])*arg1,(std::complex< double > (&)[9])*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_linspace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  size_t arg3 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  size_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< double,std::allocator< double > > result;
  
  if (!PyArg_UnpackTuple(args, "linspace", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "linspace" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "linspace" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "linspace" "', argument " "3"" of type '" "size_t""'");
  } 
  arg3 = static_cast< size_t >(val3);
  {
    try {
      result = meep::linspace(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    npy_intp vec_len = (npy_intp) (&result)->size();
    resultobj = PyArray_SimpleNew(1, &vec_len, NPY_DOUBLE);
    memcpy(PyArray_DATA((PyArrayObject*) resultobj), &result[0], vec_len * sizeof(double));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pml_quadratic_profile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  void *arg2 = (void *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "pml_quadratic_profile", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pml_quadratic_profile" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pml_quadratic_profile" "', argument " "2"" of type '" "void *""'"); 
  }
  {
    try {
      result = (double)meep::pml_quadratic_profile(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_susceptibility__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_susceptibility", 0, 0)) SWIG_fail;
  {
    try {
      result = (meep::susceptibility *)new meep::susceptibility();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__susceptibility, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_susceptibility__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::susceptibility *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_susceptibility", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__susceptibility,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_susceptibility" "', argument " "1"" of type '" "meep::susceptibility const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_susceptibility" "', argument " "1"" of type '" "meep::susceptibility const &""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  {
    try {
      result = (meep::susceptibility *)new meep::susceptibility((meep::susceptibility const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__susceptibility, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_susceptibility(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[2] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_susceptibility__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__susceptibility, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_susceptibility__SWIG_1(self, args);
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_susceptibility'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::susceptibility::susceptibility()\n"
    "    meep::susceptibility::susceptibility(meep::susceptibility const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_susceptibility_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::susceptibility *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_clone", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_clone" "', argument " "1"" of type '" "meep::susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  {
    try {
      result = (meep::susceptibility *)((meep::susceptibility const *)arg1)->clone();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_susceptibility(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_susceptibility", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_susceptibility" "', argument " "1"" of type '" "meep::susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_get_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_get_id", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_get_id" "', argument " "1"" of type '" "meep::susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  {
    try {
      result = (int)((meep::susceptibility const *)arg1)->get_id();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  meep::susceptibility *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "susceptibility___eq__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility___eq__" "', argument " "1"" of type '" "meep::susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__susceptibility,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "susceptibility___eq__" "', argument " "2"" of type '" "meep::susceptibility const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "susceptibility___eq__" "', argument " "2"" of type '" "meep::susceptibility const &""'"); 
  }
  arg2 = reinterpret_cast< meep::susceptibility * >(argp2);
  {
    try {
      result = (bool)((meep::susceptibility const *)arg1)->operator ==((meep::susceptibility const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_susceptibility_chi1__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  meep::realnum arg2 ;
  meep::realnum arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::complex< meep::realnum > result;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_chi1", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_chi1" "', argument " "1"" of type '" "meep::susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "susceptibility_chi1" "', argument " "2"" of type '" "meep::realnum""'");
  } 
  arg2 = static_cast< meep::realnum >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "susceptibility_chi1" "', argument " "3"" of type '" "meep::realnum""'");
  } 
  arg3 = static_cast< meep::realnum >(val3);
  {
    try {
      result = (arg1)->chi1(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_chi1__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  meep::realnum arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::complex< meep::realnum > result;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_chi1", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_chi1" "', argument " "1"" of type '" "meep::susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "susceptibility_chi1" "', argument " "2"" of type '" "meep::realnum""'");
  } 
  arg2 = static_cast< meep::realnum >(val2);
  {
    try {
      result = (arg1)->chi1(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_chi1(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__susceptibility, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_susceptibility_chi1__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__susceptibility, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_susceptibility_chi1__SWIG_0(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'susceptibility_chi1'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::susceptibility::chi1(meep::realnum,meep::realnum)\n"
    "    meep::susceptibility::chi1(meep::realnum)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_susceptibility_update_P(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  meep::realnum *(*arg2)[2] ;
  meep::realnum *(*arg3)[2] ;
  meep::realnum arg4 ;
  meep::grid_volume *arg5 = 0 ;
  void *arg6 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  int res6 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_update_P", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_update_P" "', argument " "1"" of type '" "meep::susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "susceptibility_update_P" "', argument " "2"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg2 = reinterpret_cast< meep::realnum *(*)[2] >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "susceptibility_update_P" "', argument " "3"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg3 = reinterpret_cast< meep::realnum *(*)[2] >(argp3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "susceptibility_update_P" "', argument " "4"" of type '" "meep::realnum""'");
  } 
  arg4 = static_cast< meep::realnum >(val4);
  res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "susceptibility_update_P" "', argument " "5"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp5) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "susceptibility_update_P" "', argument " "5"" of type '" "meep::grid_volume const &""'"); 
  }
  arg5 = reinterpret_cast< meep::grid_volume * >(argp5);
  res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "susceptibility_update_P" "', argument " "6"" of type '" "void *""'"); 
  }
  {
    try {
      ((meep::susceptibility const *)arg1)->update_P((meep::realnum *(*)[2])arg2,(meep::realnum *(*)[2])arg3,arg4,(meep::grid_volume const &)*arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_subtract_P(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  meep::field_type arg2 ;
  meep::realnum *(*arg3)[2] ;
  void *arg4 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_subtract_P", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_subtract_P" "', argument " "1"" of type '" "meep::susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "susceptibility_subtract_P" "', argument " "2"" of type '" "meep::field_type""'");
  } 
  arg2 = static_cast< meep::field_type >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "susceptibility_subtract_P" "', argument " "3"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg3 = reinterpret_cast< meep::realnum *(*)[2] >(argp3);
  res4 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg4), 0, 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "susceptibility_subtract_P" "', argument " "4"" of type '" "void *""'"); 
  }
  {
    try {
      ((meep::susceptibility const *)arg1)->subtract_P(arg2,(meep::realnum *(*)[2])arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_needs_P(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  meep::component arg2 ;
  int arg3 ;
  meep::realnum *(*arg4)[2] ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_needs_P", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_needs_P" "', argument " "1"" of type '" "meep::susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "susceptibility_needs_P" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "susceptibility_needs_P" "', argument " "4"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg4 = reinterpret_cast< meep::realnum *(*)[2] >(argp4);
  {
    try {
      result = (bool)((meep::susceptibility const *)arg1)->needs_P(arg2,arg3,(meep::realnum *(*)[2])arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_needs_W_notowned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  meep::component arg2 ;
  meep::realnum *(*arg3)[2] ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_needs_W_notowned", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_needs_W_notowned" "', argument " "1"" of type '" "meep::susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "susceptibility_needs_W_notowned" "', argument " "3"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg3 = reinterpret_cast< meep::realnum *(*)[2] >(argp3);
  {
    try {
      result = (bool)((meep::susceptibility const *)arg1)->needs_W_notowned(arg2,(meep::realnum *(*)[2])arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_needs_W_prev(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_needs_W_prev", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_needs_W_prev" "', argument " "1"" of type '" "meep::susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  {
    try {
      result = (bool)((meep::susceptibility const *)arg1)->needs_W_prev();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_new_internal_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  meep::realnum *(*arg2)[2] ;
  meep::grid_volume *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_new_internal_data", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_new_internal_data" "', argument " "1"" of type '" "meep::susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "susceptibility_new_internal_data" "', argument " "2"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg2 = reinterpret_cast< meep::realnum *(*)[2] >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "susceptibility_new_internal_data" "', argument " "3"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "susceptibility_new_internal_data" "', argument " "3"" of type '" "meep::grid_volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::grid_volume * >(argp3);
  {
    try {
      result = (void *)((meep::susceptibility const *)arg1)->new_internal_data((meep::realnum *(*)[2])arg2,(meep::grid_volume const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_delete_internal_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  void *arg2 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_delete_internal_data", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_delete_internal_data" "', argument " "1"" of type '" "meep::susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "susceptibility_delete_internal_data" "', argument " "2"" of type '" "void *""'"); 
  }
  {
    try {
      ((meep::susceptibility const *)arg1)->delete_internal_data(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_init_internal_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  meep::realnum *(*arg2)[2] ;
  meep::realnum arg3 ;
  meep::grid_volume *arg4 = 0 ;
  void *arg5 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int res5 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_init_internal_data", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_init_internal_data" "', argument " "1"" of type '" "meep::susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "susceptibility_init_internal_data" "', argument " "2"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg2 = reinterpret_cast< meep::realnum *(*)[2] >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "susceptibility_init_internal_data" "', argument " "3"" of type '" "meep::realnum""'");
  } 
  arg3 = static_cast< meep::realnum >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "susceptibility_init_internal_data" "', argument " "4"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "susceptibility_init_internal_data" "', argument " "4"" of type '" "meep::grid_volume const &""'"); 
  }
  arg4 = reinterpret_cast< meep::grid_volume * >(argp4);
  res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "susceptibility_init_internal_data" "', argument " "5"" of type '" "void *""'"); 
  }
  {
    try {
      ((meep::susceptibility const *)arg1)->init_internal_data((meep::realnum *(*)[2])arg2,arg3,(meep::grid_volume const &)*arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_copy_internal_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  void *arg2 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_copy_internal_data", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_copy_internal_data" "', argument " "1"" of type '" "meep::susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "susceptibility_copy_internal_data" "', argument " "2"" of type '" "void *""'"); 
  }
  {
    try {
      result = (void *)((meep::susceptibility const *)arg1)->copy_internal_data(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_num_internal_notowned_needed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  meep::component arg2 ;
  void *arg3 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_num_internal_notowned_needed", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_num_internal_notowned_needed" "', argument " "1"" of type '" "meep::susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "susceptibility_num_internal_notowned_needed" "', argument " "3"" of type '" "void *""'"); 
  }
  {
    try {
      result = (int)((meep::susceptibility const *)arg1)->num_internal_notowned_needed(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_internal_notowned_ptr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  int arg2 ;
  meep::component arg3 ;
  int arg4 ;
  void *arg5 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int res5 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  meep::realnum *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_internal_notowned_ptr", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_internal_notowned_ptr" "', argument " "1"" of type '" "meep::susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "susceptibility_internal_notowned_ptr" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    arg3 = static_cast<meep::component>(PyInteger_AsLong(obj2));
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "susceptibility_internal_notowned_ptr" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "susceptibility_internal_notowned_ptr" "', argument " "5"" of type '" "void *""'"); 
  }
  {
    try {
      result = (meep::realnum *)((meep::susceptibility const *)arg1)->internal_notowned_ptr(arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_num_cinternal_notowned_needed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  meep::component arg2 ;
  void *arg3 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_num_cinternal_notowned_needed", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_num_cinternal_notowned_needed" "', argument " "1"" of type '" "meep::susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "susceptibility_num_cinternal_notowned_needed" "', argument " "3"" of type '" "void *""'"); 
  }
  {
    try {
      result = (int)((meep::susceptibility const *)arg1)->num_cinternal_notowned_needed(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_cinternal_notowned_ptr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  int arg2 ;
  meep::component arg3 ;
  int arg4 ;
  int arg5 ;
  void *arg6 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int res6 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  meep::realnum *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_cinternal_notowned_ptr", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_cinternal_notowned_ptr" "', argument " "1"" of type '" "meep::susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "susceptibility_cinternal_notowned_ptr" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    arg3 = static_cast<meep::component>(PyInteger_AsLong(obj2));
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "susceptibility_cinternal_notowned_ptr" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "susceptibility_cinternal_notowned_ptr" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "susceptibility_cinternal_notowned_ptr" "', argument " "6"" of type '" "void *""'"); 
  }
  {
    try {
      result = (meep::realnum *)((meep::susceptibility const *)arg1)->cinternal_notowned_ptr(arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_dump_params(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  meep::h5file *arg2 = (meep::h5file *) 0 ;
  size_t *arg3 = (size_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_dump_params", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_dump_params" "', argument " "1"" of type '" "meep::susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "susceptibility_dump_params" "', argument " "2"" of type '" "meep::h5file *""'"); 
  }
  arg2 = reinterpret_cast< meep::h5file * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "susceptibility_dump_params" "', argument " "3"" of type '" "size_t *""'"); 
  }
  arg3 = reinterpret_cast< size_t * >(argp3);
  {
    try {
      (arg1)->dump_params(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_get_num_params(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_get_num_params", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_get_num_params" "', argument " "1"" of type '" "meep::susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  {
    try {
      result = (int)(arg1)->get_num_params();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_set_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_set_id", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_set_id" "', argument " "1"" of type '" "meep::susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "susceptibility_set_id" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      (arg1)->set_id(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_next_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  meep::susceptibility *arg2 = (meep::susceptibility *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_next_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_next_set" "', argument " "1"" of type '" "meep::susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__susceptibility, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "susceptibility_next_set" "', argument " "2"" of type '" "meep::susceptibility *""'"); 
  }
  arg2 = reinterpret_cast< meep::susceptibility * >(argp2);
  if (arg1) (arg1)->next = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::susceptibility *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_next_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_next_get" "', argument " "1"" of type '" "meep::susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  result = (meep::susceptibility *) ((arg1)->next);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_ntot_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_ntot_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_ntot_set" "', argument " "1"" of type '" "meep::susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "susceptibility_ntot_set" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  if (arg1) (arg1)->ntot = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_ntot_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  size_t result;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_ntot_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_ntot_get" "', argument " "1"" of type '" "meep::susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  result =  ((arg1)->ntot);
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_sigma_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  meep::realnum *(*arg2)[5] ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_sigma_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_sigma_set" "', argument " "1"" of type '" "meep::susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_a_5__p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "susceptibility_sigma_set" "', argument " "2"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][5]""'"); 
  } 
  arg2 = reinterpret_cast< meep::realnum *(*)[5] >(argp2);
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)meep::NUM_FIELD_COMPONENTS; ++ii) {
        if (arg2[ii]) {
          size_t jj = 0;
          for (; jj < (size_t)5; ++jj) arg1->sigma[ii][jj] = arg2[ii][jj];
        } else {
          SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""sigma""' of type '""meep::realnum *[meep::NUM_FIELD_COMPONENTS][5]""'");
        }
      }
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""sigma""' of type '""meep::realnum *[meep::NUM_FIELD_COMPONENTS][5]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_sigma_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::realnum *(*result)[5] = 0 ;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_sigma_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_sigma_get" "', argument " "1"" of type '" "meep::susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  result = (meep::realnum *(*)[5])(meep::realnum *(*)[5]) ((arg1)->sigma);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_a_5__p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_trivial_sigma_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  bool (*arg2)[5] ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_trivial_sigma_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_trivial_sigma_set" "', argument " "1"" of type '" "meep::susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_a_5__bool, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "susceptibility_trivial_sigma_set" "', argument " "2"" of type '" "bool [meep::NUM_FIELD_COMPONENTS][5]""'"); 
  } 
  arg2 = reinterpret_cast< bool (*)[5] >(argp2);
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)meep::NUM_FIELD_COMPONENTS; ++ii) {
        if (arg2[ii]) {
          size_t jj = 0;
          for (; jj < (size_t)5; ++jj) arg1->trivial_sigma[ii][jj] = arg2[ii][jj];
        } else {
          SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""trivial_sigma""' of type '""bool [meep::NUM_FIELD_COMPONENTS][5]""'");
        }
      }
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""trivial_sigma""' of type '""bool [meep::NUM_FIELD_COMPONENTS][5]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_susceptibility_trivial_sigma_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::susceptibility *arg1 = (meep::susceptibility *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool (*result)[5] = 0 ;
  
  if (!PyArg_UnpackTuple(args, "susceptibility_trivial_sigma_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "susceptibility_trivial_sigma_get" "', argument " "1"" of type '" "meep::susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::susceptibility * >(argp1);
  result = (bool (*)[5])(bool (*)[5]) ((arg1)->trivial_sigma);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_a_5__bool, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *susceptibility_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__susceptibility, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *susceptibility_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_lorentzian_susceptibility__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::realnum arg1 ;
  meep::realnum arg2 ;
  bool arg3 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::lorentzian_susceptibility *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_lorentzian_susceptibility", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_lorentzian_susceptibility" "', argument " "1"" of type '" "meep::realnum""'");
  } 
  arg1 = static_cast< meep::realnum >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_lorentzian_susceptibility" "', argument " "2"" of type '" "meep::realnum""'");
  } 
  arg2 = static_cast< meep::realnum >(val2);
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_lorentzian_susceptibility" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      result = (meep::lorentzian_susceptibility *)new meep::lorentzian_susceptibility(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__lorentzian_susceptibility, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_lorentzian_susceptibility__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::realnum arg1 ;
  meep::realnum arg2 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::lorentzian_susceptibility *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_lorentzian_susceptibility", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_lorentzian_susceptibility" "', argument " "1"" of type '" "meep::realnum""'");
  } 
  arg1 = static_cast< meep::realnum >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_lorentzian_susceptibility" "', argument " "2"" of type '" "meep::realnum""'");
  } 
  arg2 = static_cast< meep::realnum >(val2);
  {
    try {
      result = (meep::lorentzian_susceptibility *)new meep::lorentzian_susceptibility(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__lorentzian_susceptibility, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_lorentzian_susceptibility(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_lorentzian_susceptibility__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_bool(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new_lorentzian_susceptibility__SWIG_0(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_lorentzian_susceptibility'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::lorentzian_susceptibility::lorentzian_susceptibility(meep::realnum,meep::realnum,bool)\n"
    "    meep::lorentzian_susceptibility::lorentzian_susceptibility(meep::realnum,meep::realnum)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_lorentzian_susceptibility_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::lorentzian_susceptibility *arg1 = (meep::lorentzian_susceptibility *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::susceptibility *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "lorentzian_susceptibility_clone", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__lorentzian_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lorentzian_susceptibility_clone" "', argument " "1"" of type '" "meep::lorentzian_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::lorentzian_susceptibility * >(argp1);
  {
    try {
      result = (meep::susceptibility *)((meep::lorentzian_susceptibility const *)arg1)->clone();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_lorentzian_susceptibility(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::lorentzian_susceptibility *arg1 = (meep::lorentzian_susceptibility *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_lorentzian_susceptibility", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__lorentzian_susceptibility, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_lorentzian_susceptibility" "', argument " "1"" of type '" "meep::lorentzian_susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::lorentzian_susceptibility * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lorentzian_susceptibility_chi1__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::lorentzian_susceptibility *arg1 = (meep::lorentzian_susceptibility *) 0 ;
  meep::realnum arg2 ;
  meep::realnum arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::complex< meep::realnum > result;
  
  if (!PyArg_UnpackTuple(args, "lorentzian_susceptibility_chi1", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__lorentzian_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lorentzian_susceptibility_chi1" "', argument " "1"" of type '" "meep::lorentzian_susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::lorentzian_susceptibility * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "lorentzian_susceptibility_chi1" "', argument " "2"" of type '" "meep::realnum""'");
  } 
  arg2 = static_cast< meep::realnum >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "lorentzian_susceptibility_chi1" "', argument " "3"" of type '" "meep::realnum""'");
  } 
  arg3 = static_cast< meep::realnum >(val3);
  {
    try {
      result = (arg1)->chi1(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lorentzian_susceptibility_chi1__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::lorentzian_susceptibility *arg1 = (meep::lorentzian_susceptibility *) 0 ;
  meep::realnum arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::complex< meep::realnum > result;
  
  if (!PyArg_UnpackTuple(args, "lorentzian_susceptibility_chi1", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__lorentzian_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lorentzian_susceptibility_chi1" "', argument " "1"" of type '" "meep::lorentzian_susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::lorentzian_susceptibility * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "lorentzian_susceptibility_chi1" "', argument " "2"" of type '" "meep::realnum""'");
  } 
  arg2 = static_cast< meep::realnum >(val2);
  {
    try {
      result = (arg1)->chi1(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lorentzian_susceptibility_chi1(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__lorentzian_susceptibility, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_lorentzian_susceptibility_chi1__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__lorentzian_susceptibility, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_lorentzian_susceptibility_chi1__SWIG_0(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'lorentzian_susceptibility_chi1'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::lorentzian_susceptibility::chi1(meep::realnum,meep::realnum)\n"
    "    meep::lorentzian_susceptibility::chi1(meep::realnum)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_lorentzian_susceptibility_update_P(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::lorentzian_susceptibility *arg1 = (meep::lorentzian_susceptibility *) 0 ;
  meep::realnum *(*arg2)[2] ;
  meep::realnum *(*arg3)[2] ;
  meep::realnum arg4 ;
  meep::grid_volume *arg5 = 0 ;
  void *arg6 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  int res6 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "lorentzian_susceptibility_update_P", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__lorentzian_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lorentzian_susceptibility_update_P" "', argument " "1"" of type '" "meep::lorentzian_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::lorentzian_susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "lorentzian_susceptibility_update_P" "', argument " "2"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg2 = reinterpret_cast< meep::realnum *(*)[2] >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "lorentzian_susceptibility_update_P" "', argument " "3"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg3 = reinterpret_cast< meep::realnum *(*)[2] >(argp3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "lorentzian_susceptibility_update_P" "', argument " "4"" of type '" "meep::realnum""'");
  } 
  arg4 = static_cast< meep::realnum >(val4);
  res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "lorentzian_susceptibility_update_P" "', argument " "5"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp5) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "lorentzian_susceptibility_update_P" "', argument " "5"" of type '" "meep::grid_volume const &""'"); 
  }
  arg5 = reinterpret_cast< meep::grid_volume * >(argp5);
  res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "lorentzian_susceptibility_update_P" "', argument " "6"" of type '" "void *""'"); 
  }
  {
    try {
      ((meep::lorentzian_susceptibility const *)arg1)->update_P((meep::realnum *(*)[2])arg2,(meep::realnum *(*)[2])arg3,arg4,(meep::grid_volume const &)*arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lorentzian_susceptibility_subtract_P(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::lorentzian_susceptibility *arg1 = (meep::lorentzian_susceptibility *) 0 ;
  meep::field_type arg2 ;
  meep::realnum *(*arg3)[2] ;
  void *arg4 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "lorentzian_susceptibility_subtract_P", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__lorentzian_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lorentzian_susceptibility_subtract_P" "', argument " "1"" of type '" "meep::lorentzian_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::lorentzian_susceptibility * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "lorentzian_susceptibility_subtract_P" "', argument " "2"" of type '" "meep::field_type""'");
  } 
  arg2 = static_cast< meep::field_type >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "lorentzian_susceptibility_subtract_P" "', argument " "3"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg3 = reinterpret_cast< meep::realnum *(*)[2] >(argp3);
  res4 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg4), 0, 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "lorentzian_susceptibility_subtract_P" "', argument " "4"" of type '" "void *""'"); 
  }
  {
    try {
      ((meep::lorentzian_susceptibility const *)arg1)->subtract_P(arg2,(meep::realnum *(*)[2])arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lorentzian_susceptibility_new_internal_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::lorentzian_susceptibility *arg1 = (meep::lorentzian_susceptibility *) 0 ;
  meep::realnum *(*arg2)[2] ;
  meep::grid_volume *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "lorentzian_susceptibility_new_internal_data", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__lorentzian_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lorentzian_susceptibility_new_internal_data" "', argument " "1"" of type '" "meep::lorentzian_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::lorentzian_susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "lorentzian_susceptibility_new_internal_data" "', argument " "2"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg2 = reinterpret_cast< meep::realnum *(*)[2] >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "lorentzian_susceptibility_new_internal_data" "', argument " "3"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "lorentzian_susceptibility_new_internal_data" "', argument " "3"" of type '" "meep::grid_volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::grid_volume * >(argp3);
  {
    try {
      result = (void *)((meep::lorentzian_susceptibility const *)arg1)->new_internal_data((meep::realnum *(*)[2])arg2,(meep::grid_volume const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lorentzian_susceptibility_init_internal_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::lorentzian_susceptibility *arg1 = (meep::lorentzian_susceptibility *) 0 ;
  meep::realnum *(*arg2)[2] ;
  meep::realnum arg3 ;
  meep::grid_volume *arg4 = 0 ;
  void *arg5 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int res5 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "lorentzian_susceptibility_init_internal_data", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__lorentzian_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lorentzian_susceptibility_init_internal_data" "', argument " "1"" of type '" "meep::lorentzian_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::lorentzian_susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "lorentzian_susceptibility_init_internal_data" "', argument " "2"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg2 = reinterpret_cast< meep::realnum *(*)[2] >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "lorentzian_susceptibility_init_internal_data" "', argument " "3"" of type '" "meep::realnum""'");
  } 
  arg3 = static_cast< meep::realnum >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "lorentzian_susceptibility_init_internal_data" "', argument " "4"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "lorentzian_susceptibility_init_internal_data" "', argument " "4"" of type '" "meep::grid_volume const &""'"); 
  }
  arg4 = reinterpret_cast< meep::grid_volume * >(argp4);
  res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "lorentzian_susceptibility_init_internal_data" "', argument " "5"" of type '" "void *""'"); 
  }
  {
    try {
      ((meep::lorentzian_susceptibility const *)arg1)->init_internal_data((meep::realnum *(*)[2])arg2,arg3,(meep::grid_volume const &)*arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lorentzian_susceptibility_copy_internal_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::lorentzian_susceptibility *arg1 = (meep::lorentzian_susceptibility *) 0 ;
  void *arg2 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "lorentzian_susceptibility_copy_internal_data", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__lorentzian_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lorentzian_susceptibility_copy_internal_data" "', argument " "1"" of type '" "meep::lorentzian_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::lorentzian_susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "lorentzian_susceptibility_copy_internal_data" "', argument " "2"" of type '" "void *""'"); 
  }
  {
    try {
      result = (void *)((meep::lorentzian_susceptibility const *)arg1)->copy_internal_data(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lorentzian_susceptibility_num_cinternal_notowned_needed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::lorentzian_susceptibility *arg1 = (meep::lorentzian_susceptibility *) 0 ;
  meep::component arg2 ;
  void *arg3 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "lorentzian_susceptibility_num_cinternal_notowned_needed", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__lorentzian_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lorentzian_susceptibility_num_cinternal_notowned_needed" "', argument " "1"" of type '" "meep::lorentzian_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::lorentzian_susceptibility * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "lorentzian_susceptibility_num_cinternal_notowned_needed" "', argument " "3"" of type '" "void *""'"); 
  }
  {
    try {
      result = (int)((meep::lorentzian_susceptibility const *)arg1)->num_cinternal_notowned_needed(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lorentzian_susceptibility_cinternal_notowned_ptr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::lorentzian_susceptibility *arg1 = (meep::lorentzian_susceptibility *) 0 ;
  int arg2 ;
  meep::component arg3 ;
  int arg4 ;
  int arg5 ;
  void *arg6 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int res6 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  meep::realnum *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "lorentzian_susceptibility_cinternal_notowned_ptr", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__lorentzian_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lorentzian_susceptibility_cinternal_notowned_ptr" "', argument " "1"" of type '" "meep::lorentzian_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::lorentzian_susceptibility * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "lorentzian_susceptibility_cinternal_notowned_ptr" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    arg3 = static_cast<meep::component>(PyInteger_AsLong(obj2));
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "lorentzian_susceptibility_cinternal_notowned_ptr" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "lorentzian_susceptibility_cinternal_notowned_ptr" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "lorentzian_susceptibility_cinternal_notowned_ptr" "', argument " "6"" of type '" "void *""'"); 
  }
  {
    try {
      result = (meep::realnum *)((meep::lorentzian_susceptibility const *)arg1)->cinternal_notowned_ptr(arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lorentzian_susceptibility_dump_params(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::lorentzian_susceptibility *arg1 = (meep::lorentzian_susceptibility *) 0 ;
  meep::h5file *arg2 = (meep::h5file *) 0 ;
  size_t *arg3 = (size_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "lorentzian_susceptibility_dump_params", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__lorentzian_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lorentzian_susceptibility_dump_params" "', argument " "1"" of type '" "meep::lorentzian_susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::lorentzian_susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "lorentzian_susceptibility_dump_params" "', argument " "2"" of type '" "meep::h5file *""'"); 
  }
  arg2 = reinterpret_cast< meep::h5file * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "lorentzian_susceptibility_dump_params" "', argument " "3"" of type '" "size_t *""'"); 
  }
  arg3 = reinterpret_cast< size_t * >(argp3);
  {
    try {
      (arg1)->dump_params(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lorentzian_susceptibility_get_num_params(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::lorentzian_susceptibility *arg1 = (meep::lorentzian_susceptibility *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "lorentzian_susceptibility_get_num_params", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__lorentzian_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lorentzian_susceptibility_get_num_params" "', argument " "1"" of type '" "meep::lorentzian_susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::lorentzian_susceptibility * >(argp1);
  {
    try {
      result = (int)(arg1)->get_num_params();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *lorentzian_susceptibility_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__lorentzian_susceptibility, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *lorentzian_susceptibility_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_noisy_lorentzian_susceptibility__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::realnum arg1 ;
  meep::realnum arg2 ;
  meep::realnum arg3 ;
  bool arg4 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::noisy_lorentzian_susceptibility *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_noisy_lorentzian_susceptibility", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_noisy_lorentzian_susceptibility" "', argument " "1"" of type '" "meep::realnum""'");
  } 
  arg1 = static_cast< meep::realnum >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_noisy_lorentzian_susceptibility" "', argument " "2"" of type '" "meep::realnum""'");
  } 
  arg2 = static_cast< meep::realnum >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_noisy_lorentzian_susceptibility" "', argument " "3"" of type '" "meep::realnum""'");
  } 
  arg3 = static_cast< meep::realnum >(val3);
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_noisy_lorentzian_susceptibility" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  {
    try {
      result = (meep::noisy_lorentzian_susceptibility *)new meep::noisy_lorentzian_susceptibility(arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__noisy_lorentzian_susceptibility, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_noisy_lorentzian_susceptibility__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::realnum arg1 ;
  meep::realnum arg2 ;
  meep::realnum arg3 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::noisy_lorentzian_susceptibility *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_noisy_lorentzian_susceptibility", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_noisy_lorentzian_susceptibility" "', argument " "1"" of type '" "meep::realnum""'");
  } 
  arg1 = static_cast< meep::realnum >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_noisy_lorentzian_susceptibility" "', argument " "2"" of type '" "meep::realnum""'");
  } 
  arg2 = static_cast< meep::realnum >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_noisy_lorentzian_susceptibility" "', argument " "3"" of type '" "meep::realnum""'");
  } 
  arg3 = static_cast< meep::realnum >(val3);
  {
    try {
      result = (meep::noisy_lorentzian_susceptibility *)new meep::noisy_lorentzian_susceptibility(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__noisy_lorentzian_susceptibility, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_noisy_lorentzian_susceptibility(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new_noisy_lorentzian_susceptibility__SWIG_1(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_new_noisy_lorentzian_susceptibility__SWIG_0(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_noisy_lorentzian_susceptibility'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::noisy_lorentzian_susceptibility::noisy_lorentzian_susceptibility(meep::realnum,meep::realnum,meep::realnum,bool)\n"
    "    meep::noisy_lorentzian_susceptibility::noisy_lorentzian_susceptibility(meep::realnum,meep::realnum,meep::realnum)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_noisy_lorentzian_susceptibility_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::noisy_lorentzian_susceptibility *arg1 = (meep::noisy_lorentzian_susceptibility *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::susceptibility *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "noisy_lorentzian_susceptibility_clone", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__noisy_lorentzian_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "noisy_lorentzian_susceptibility_clone" "', argument " "1"" of type '" "meep::noisy_lorentzian_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::noisy_lorentzian_susceptibility * >(argp1);
  {
    try {
      result = (meep::susceptibility *)((meep::noisy_lorentzian_susceptibility const *)arg1)->clone();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_noisy_lorentzian_susceptibility_update_P(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::noisy_lorentzian_susceptibility *arg1 = (meep::noisy_lorentzian_susceptibility *) 0 ;
  meep::realnum *(*arg2)[2] ;
  meep::realnum *(*arg3)[2] ;
  meep::realnum arg4 ;
  meep::grid_volume *arg5 = 0 ;
  void *arg6 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  int res6 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "noisy_lorentzian_susceptibility_update_P", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__noisy_lorentzian_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "noisy_lorentzian_susceptibility_update_P" "', argument " "1"" of type '" "meep::noisy_lorentzian_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::noisy_lorentzian_susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "noisy_lorentzian_susceptibility_update_P" "', argument " "2"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg2 = reinterpret_cast< meep::realnum *(*)[2] >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "noisy_lorentzian_susceptibility_update_P" "', argument " "3"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg3 = reinterpret_cast< meep::realnum *(*)[2] >(argp3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "noisy_lorentzian_susceptibility_update_P" "', argument " "4"" of type '" "meep::realnum""'");
  } 
  arg4 = static_cast< meep::realnum >(val4);
  res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "noisy_lorentzian_susceptibility_update_P" "', argument " "5"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp5) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "noisy_lorentzian_susceptibility_update_P" "', argument " "5"" of type '" "meep::grid_volume const &""'"); 
  }
  arg5 = reinterpret_cast< meep::grid_volume * >(argp5);
  res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "noisy_lorentzian_susceptibility_update_P" "', argument " "6"" of type '" "void *""'"); 
  }
  {
    try {
      ((meep::noisy_lorentzian_susceptibility const *)arg1)->update_P((meep::realnum *(*)[2])arg2,(meep::realnum *(*)[2])arg3,arg4,(meep::grid_volume const &)*arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_noisy_lorentzian_susceptibility_dump_params(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::noisy_lorentzian_susceptibility *arg1 = (meep::noisy_lorentzian_susceptibility *) 0 ;
  meep::h5file *arg2 = (meep::h5file *) 0 ;
  size_t *arg3 = (size_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "noisy_lorentzian_susceptibility_dump_params", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__noisy_lorentzian_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "noisy_lorentzian_susceptibility_dump_params" "', argument " "1"" of type '" "meep::noisy_lorentzian_susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::noisy_lorentzian_susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "noisy_lorentzian_susceptibility_dump_params" "', argument " "2"" of type '" "meep::h5file *""'"); 
  }
  arg2 = reinterpret_cast< meep::h5file * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "noisy_lorentzian_susceptibility_dump_params" "', argument " "3"" of type '" "size_t *""'"); 
  }
  arg3 = reinterpret_cast< size_t * >(argp3);
  {
    try {
      (arg1)->dump_params(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_noisy_lorentzian_susceptibility_get_num_params(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::noisy_lorentzian_susceptibility *arg1 = (meep::noisy_lorentzian_susceptibility *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "noisy_lorentzian_susceptibility_get_num_params", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__noisy_lorentzian_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "noisy_lorentzian_susceptibility_get_num_params" "', argument " "1"" of type '" "meep::noisy_lorentzian_susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::noisy_lorentzian_susceptibility * >(argp1);
  {
    try {
      result = (int)(arg1)->get_num_params();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_noisy_lorentzian_susceptibility(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::noisy_lorentzian_susceptibility *arg1 = (meep::noisy_lorentzian_susceptibility *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_noisy_lorentzian_susceptibility", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__noisy_lorentzian_susceptibility, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_noisy_lorentzian_susceptibility" "', argument " "1"" of type '" "meep::noisy_lorentzian_susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::noisy_lorentzian_susceptibility * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *noisy_lorentzian_susceptibility_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__noisy_lorentzian_susceptibility, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *noisy_lorentzian_susceptibility_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_gyrotropic_susceptibility__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = 0 ;
  meep::realnum arg2 ;
  meep::realnum arg3 ;
  meep::realnum arg4 ;
  meep::gyrotropy_model arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  meep::gyrotropic_susceptibility *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_gyrotropic_susceptibility", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_gyrotropic_susceptibility" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_gyrotropic_susceptibility" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_gyrotropic_susceptibility" "', argument " "2"" of type '" "meep::realnum""'");
  } 
  arg2 = static_cast< meep::realnum >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_gyrotropic_susceptibility" "', argument " "3"" of type '" "meep::realnum""'");
  } 
  arg3 = static_cast< meep::realnum >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_gyrotropic_susceptibility" "', argument " "4"" of type '" "meep::realnum""'");
  } 
  arg4 = static_cast< meep::realnum >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_gyrotropic_susceptibility" "', argument " "5"" of type '" "meep::gyrotropy_model""'");
  } 
  arg5 = static_cast< meep::gyrotropy_model >(val5);
  {
    try {
      result = (meep::gyrotropic_susceptibility *)new meep::gyrotropic_susceptibility((meep::vec const &)*arg1,arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__gyrotropic_susceptibility, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_gyrotropic_susceptibility__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = 0 ;
  meep::realnum arg2 ;
  meep::realnum arg3 ;
  meep::realnum arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::gyrotropic_susceptibility *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_gyrotropic_susceptibility", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_gyrotropic_susceptibility" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_gyrotropic_susceptibility" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_gyrotropic_susceptibility" "', argument " "2"" of type '" "meep::realnum""'");
  } 
  arg2 = static_cast< meep::realnum >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_gyrotropic_susceptibility" "', argument " "3"" of type '" "meep::realnum""'");
  } 
  arg3 = static_cast< meep::realnum >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_gyrotropic_susceptibility" "', argument " "4"" of type '" "meep::realnum""'");
  } 
  arg4 = static_cast< meep::realnum >(val4);
  {
    try {
      result = (meep::gyrotropic_susceptibility *)new meep::gyrotropic_susceptibility((meep::vec const &)*arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__gyrotropic_susceptibility, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_gyrotropic_susceptibility__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = 0 ;
  meep::realnum arg2 ;
  meep::realnum arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::gyrotropic_susceptibility *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_gyrotropic_susceptibility", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_gyrotropic_susceptibility" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_gyrotropic_susceptibility" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_gyrotropic_susceptibility" "', argument " "2"" of type '" "meep::realnum""'");
  } 
  arg2 = static_cast< meep::realnum >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_gyrotropic_susceptibility" "', argument " "3"" of type '" "meep::realnum""'");
  } 
  arg3 = static_cast< meep::realnum >(val3);
  {
    try {
      result = (meep::gyrotropic_susceptibility *)new meep::gyrotropic_susceptibility((meep::vec const &)*arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__gyrotropic_susceptibility, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_gyrotropic_susceptibility(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new_gyrotropic_susceptibility__SWIG_2(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_new_gyrotropic_susceptibility__SWIG_1(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_new_gyrotropic_susceptibility__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_gyrotropic_susceptibility'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::gyrotropic_susceptibility::gyrotropic_susceptibility(meep::vec const &,meep::realnum,meep::realnum,meep::realnum,meep::gyrotropy_model)\n"
    "    meep::gyrotropic_susceptibility::gyrotropic_susceptibility(meep::vec const &,meep::realnum,meep::realnum,meep::realnum)\n"
    "    meep::gyrotropic_susceptibility::gyrotropic_susceptibility(meep::vec const &,meep::realnum,meep::realnum)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_gyrotropic_susceptibility_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gyrotropic_susceptibility *arg1 = (meep::gyrotropic_susceptibility *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::susceptibility *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "gyrotropic_susceptibility_clone", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gyrotropic_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gyrotropic_susceptibility_clone" "', argument " "1"" of type '" "meep::gyrotropic_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::gyrotropic_susceptibility * >(argp1);
  {
    try {
      result = (meep::susceptibility *)((meep::gyrotropic_susceptibility const *)arg1)->clone();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_gyrotropic_susceptibility_new_internal_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gyrotropic_susceptibility *arg1 = (meep::gyrotropic_susceptibility *) 0 ;
  meep::realnum *(*arg2)[2] ;
  meep::grid_volume *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "gyrotropic_susceptibility_new_internal_data", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gyrotropic_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gyrotropic_susceptibility_new_internal_data" "', argument " "1"" of type '" "meep::gyrotropic_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::gyrotropic_susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gyrotropic_susceptibility_new_internal_data" "', argument " "2"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg2 = reinterpret_cast< meep::realnum *(*)[2] >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "gyrotropic_susceptibility_new_internal_data" "', argument " "3"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gyrotropic_susceptibility_new_internal_data" "', argument " "3"" of type '" "meep::grid_volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::grid_volume * >(argp3);
  {
    try {
      result = (void *)((meep::gyrotropic_susceptibility const *)arg1)->new_internal_data((meep::realnum *(*)[2])arg2,(meep::grid_volume const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_gyrotropic_susceptibility_init_internal_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gyrotropic_susceptibility *arg1 = (meep::gyrotropic_susceptibility *) 0 ;
  meep::realnum *(*arg2)[2] ;
  meep::realnum arg3 ;
  meep::grid_volume *arg4 = 0 ;
  void *arg5 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int res5 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "gyrotropic_susceptibility_init_internal_data", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gyrotropic_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gyrotropic_susceptibility_init_internal_data" "', argument " "1"" of type '" "meep::gyrotropic_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::gyrotropic_susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gyrotropic_susceptibility_init_internal_data" "', argument " "2"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg2 = reinterpret_cast< meep::realnum *(*)[2] >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gyrotropic_susceptibility_init_internal_data" "', argument " "3"" of type '" "meep::realnum""'");
  } 
  arg3 = static_cast< meep::realnum >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "gyrotropic_susceptibility_init_internal_data" "', argument " "4"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gyrotropic_susceptibility_init_internal_data" "', argument " "4"" of type '" "meep::grid_volume const &""'"); 
  }
  arg4 = reinterpret_cast< meep::grid_volume * >(argp4);
  res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "gyrotropic_susceptibility_init_internal_data" "', argument " "5"" of type '" "void *""'"); 
  }
  {
    try {
      ((meep::gyrotropic_susceptibility const *)arg1)->init_internal_data((meep::realnum *(*)[2])arg2,arg3,(meep::grid_volume const &)*arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_gyrotropic_susceptibility_copy_internal_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gyrotropic_susceptibility *arg1 = (meep::gyrotropic_susceptibility *) 0 ;
  void *arg2 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "gyrotropic_susceptibility_copy_internal_data", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gyrotropic_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gyrotropic_susceptibility_copy_internal_data" "', argument " "1"" of type '" "meep::gyrotropic_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::gyrotropic_susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gyrotropic_susceptibility_copy_internal_data" "', argument " "2"" of type '" "void *""'"); 
  }
  {
    try {
      result = (void *)((meep::gyrotropic_susceptibility const *)arg1)->copy_internal_data(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_gyrotropic_susceptibility_needs_P(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gyrotropic_susceptibility *arg1 = (meep::gyrotropic_susceptibility *) 0 ;
  meep::component arg2 ;
  int arg3 ;
  meep::realnum *(*arg4)[2] ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "gyrotropic_susceptibility_needs_P", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gyrotropic_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gyrotropic_susceptibility_needs_P" "', argument " "1"" of type '" "meep::gyrotropic_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::gyrotropic_susceptibility * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "gyrotropic_susceptibility_needs_P" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "gyrotropic_susceptibility_needs_P" "', argument " "4"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg4 = reinterpret_cast< meep::realnum *(*)[2] >(argp4);
  {
    try {
      result = (bool)((meep::gyrotropic_susceptibility const *)arg1)->needs_P(arg2,arg3,(meep::realnum *(*)[2])arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_gyrotropic_susceptibility_update_P(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gyrotropic_susceptibility *arg1 = (meep::gyrotropic_susceptibility *) 0 ;
  meep::realnum *(*arg2)[2] ;
  meep::realnum *(*arg3)[2] ;
  meep::realnum arg4 ;
  meep::grid_volume *arg5 = 0 ;
  void *arg6 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  int res6 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "gyrotropic_susceptibility_update_P", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gyrotropic_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gyrotropic_susceptibility_update_P" "', argument " "1"" of type '" "meep::gyrotropic_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::gyrotropic_susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gyrotropic_susceptibility_update_P" "', argument " "2"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg2 = reinterpret_cast< meep::realnum *(*)[2] >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "gyrotropic_susceptibility_update_P" "', argument " "3"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg3 = reinterpret_cast< meep::realnum *(*)[2] >(argp3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gyrotropic_susceptibility_update_P" "', argument " "4"" of type '" "meep::realnum""'");
  } 
  arg4 = static_cast< meep::realnum >(val4);
  res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "gyrotropic_susceptibility_update_P" "', argument " "5"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp5) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gyrotropic_susceptibility_update_P" "', argument " "5"" of type '" "meep::grid_volume const &""'"); 
  }
  arg5 = reinterpret_cast< meep::grid_volume * >(argp5);
  res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "gyrotropic_susceptibility_update_P" "', argument " "6"" of type '" "void *""'"); 
  }
  {
    try {
      ((meep::gyrotropic_susceptibility const *)arg1)->update_P((meep::realnum *(*)[2])arg2,(meep::realnum *(*)[2])arg3,arg4,(meep::grid_volume const &)*arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_gyrotropic_susceptibility_subtract_P(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gyrotropic_susceptibility *arg1 = (meep::gyrotropic_susceptibility *) 0 ;
  meep::field_type arg2 ;
  meep::realnum *(*arg3)[2] ;
  void *arg4 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "gyrotropic_susceptibility_subtract_P", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gyrotropic_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gyrotropic_susceptibility_subtract_P" "', argument " "1"" of type '" "meep::gyrotropic_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::gyrotropic_susceptibility * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gyrotropic_susceptibility_subtract_P" "', argument " "2"" of type '" "meep::field_type""'");
  } 
  arg2 = static_cast< meep::field_type >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "gyrotropic_susceptibility_subtract_P" "', argument " "3"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg3 = reinterpret_cast< meep::realnum *(*)[2] >(argp3);
  res4 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg4), 0, 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "gyrotropic_susceptibility_subtract_P" "', argument " "4"" of type '" "void *""'"); 
  }
  {
    try {
      ((meep::gyrotropic_susceptibility const *)arg1)->subtract_P(arg2,(meep::realnum *(*)[2])arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_gyrotropic_susceptibility_num_cinternal_notowned_needed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gyrotropic_susceptibility *arg1 = (meep::gyrotropic_susceptibility *) 0 ;
  meep::component arg2 ;
  void *arg3 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "gyrotropic_susceptibility_num_cinternal_notowned_needed", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gyrotropic_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gyrotropic_susceptibility_num_cinternal_notowned_needed" "', argument " "1"" of type '" "meep::gyrotropic_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::gyrotropic_susceptibility * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "gyrotropic_susceptibility_num_cinternal_notowned_needed" "', argument " "3"" of type '" "void *""'"); 
  }
  {
    try {
      result = (int)((meep::gyrotropic_susceptibility const *)arg1)->num_cinternal_notowned_needed(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_gyrotropic_susceptibility_cinternal_notowned_ptr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gyrotropic_susceptibility *arg1 = (meep::gyrotropic_susceptibility *) 0 ;
  int arg2 ;
  meep::component arg3 ;
  int arg4 ;
  int arg5 ;
  void *arg6 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int res6 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  meep::realnum *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "gyrotropic_susceptibility_cinternal_notowned_ptr", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gyrotropic_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gyrotropic_susceptibility_cinternal_notowned_ptr" "', argument " "1"" of type '" "meep::gyrotropic_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::gyrotropic_susceptibility * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gyrotropic_susceptibility_cinternal_notowned_ptr" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    arg3 = static_cast<meep::component>(PyInteger_AsLong(obj2));
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gyrotropic_susceptibility_cinternal_notowned_ptr" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "gyrotropic_susceptibility_cinternal_notowned_ptr" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "gyrotropic_susceptibility_cinternal_notowned_ptr" "', argument " "6"" of type '" "void *""'"); 
  }
  {
    try {
      result = (meep::realnum *)((meep::gyrotropic_susceptibility const *)arg1)->cinternal_notowned_ptr(arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_gyrotropic_susceptibility_dump_params(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gyrotropic_susceptibility *arg1 = (meep::gyrotropic_susceptibility *) 0 ;
  meep::h5file *arg2 = (meep::h5file *) 0 ;
  size_t *arg3 = (size_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "gyrotropic_susceptibility_dump_params", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gyrotropic_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gyrotropic_susceptibility_dump_params" "', argument " "1"" of type '" "meep::gyrotropic_susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::gyrotropic_susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gyrotropic_susceptibility_dump_params" "', argument " "2"" of type '" "meep::h5file *""'"); 
  }
  arg2 = reinterpret_cast< meep::h5file * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "gyrotropic_susceptibility_dump_params" "', argument " "3"" of type '" "size_t *""'"); 
  }
  arg3 = reinterpret_cast< size_t * >(argp3);
  {
    try {
      (arg1)->dump_params(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_gyrotropic_susceptibility_get_num_params(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gyrotropic_susceptibility *arg1 = (meep::gyrotropic_susceptibility *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "gyrotropic_susceptibility_get_num_params", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gyrotropic_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gyrotropic_susceptibility_get_num_params" "', argument " "1"" of type '" "meep::gyrotropic_susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::gyrotropic_susceptibility * >(argp1);
  {
    try {
      result = (int)(arg1)->get_num_params();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_gyrotropic_susceptibility_needs_W_notowned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gyrotropic_susceptibility *arg1 = (meep::gyrotropic_susceptibility *) 0 ;
  meep::component arg2 ;
  meep::realnum *(*arg3)[2] ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "gyrotropic_susceptibility_needs_W_notowned", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gyrotropic_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gyrotropic_susceptibility_needs_W_notowned" "', argument " "1"" of type '" "meep::gyrotropic_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::gyrotropic_susceptibility * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "gyrotropic_susceptibility_needs_W_notowned" "', argument " "3"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg3 = reinterpret_cast< meep::realnum *(*)[2] >(argp3);
  {
    try {
      result = (bool)((meep::gyrotropic_susceptibility const *)arg1)->needs_W_notowned(arg2,(meep::realnum *(*)[2])arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_gyrotropic_susceptibility(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gyrotropic_susceptibility *arg1 = (meep::gyrotropic_susceptibility *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_gyrotropic_susceptibility", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gyrotropic_susceptibility, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_gyrotropic_susceptibility" "', argument " "1"" of type '" "meep::gyrotropic_susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::gyrotropic_susceptibility * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *gyrotropic_susceptibility_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__gyrotropic_susceptibility, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *gyrotropic_susceptibility_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_multilevel_susceptibility__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::multilevel_susceptibility *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_multilevel_susceptibility", 0, 0)) SWIG_fail;
  {
    try {
      result = (meep::multilevel_susceptibility *)new meep::multilevel_susceptibility();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__multilevel_susceptibility, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_multilevel_susceptibility__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  meep::realnum *arg3 = (meep::realnum *) 0 ;
  meep::realnum *arg4 = (meep::realnum *) 0 ;
  meep::realnum *arg5 = (meep::realnum *) 0 ;
  meep::realnum *arg6 = (meep::realnum *) 0 ;
  meep::realnum *arg7 = (meep::realnum *) 0 ;
  meep::realnum *arg8 = (meep::realnum *) 0 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  meep::multilevel_susceptibility *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_multilevel_susceptibility", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_multilevel_susceptibility" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_multilevel_susceptibility" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_multilevel_susceptibility" "', argument " "3"" of type '" "meep::realnum const *""'"); 
  }
  arg3 = reinterpret_cast< meep::realnum * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_multilevel_susceptibility" "', argument " "4"" of type '" "meep::realnum const *""'"); 
  }
  arg4 = reinterpret_cast< meep::realnum * >(argp4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_multilevel_susceptibility" "', argument " "5"" of type '" "meep::realnum const *""'"); 
  }
  arg5 = reinterpret_cast< meep::realnum * >(argp5);
  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_multilevel_susceptibility" "', argument " "6"" of type '" "meep::realnum const *""'"); 
  }
  arg6 = reinterpret_cast< meep::realnum * >(argp6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_multilevel_susceptibility" "', argument " "7"" of type '" "meep::realnum const *""'"); 
  }
  arg7 = reinterpret_cast< meep::realnum * >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_multilevel_susceptibility" "', argument " "8"" of type '" "meep::realnum const *""'"); 
  }
  arg8 = reinterpret_cast< meep::realnum * >(argp8);
  {
    try {
      result = (meep::multilevel_susceptibility *)new meep::multilevel_susceptibility(arg1,arg2,(meep::realnum const *)arg3,(meep::realnum const *)arg4,(meep::realnum const *)arg5,(meep::realnum const *)arg6,(meep::realnum const *)arg7,(meep::realnum const *)arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__multilevel_susceptibility, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_multilevel_susceptibility__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::multilevel_susceptibility *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::multilevel_susceptibility *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_multilevel_susceptibility", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__multilevel_susceptibility,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_multilevel_susceptibility" "', argument " "1"" of type '" "meep::multilevel_susceptibility const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_multilevel_susceptibility" "', argument " "1"" of type '" "meep::multilevel_susceptibility const &""'"); 
  }
  arg1 = reinterpret_cast< meep::multilevel_susceptibility * >(argp1);
  {
    try {
      result = (meep::multilevel_susceptibility *)new meep::multilevel_susceptibility((meep::multilevel_susceptibility const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__multilevel_susceptibility, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_multilevel_susceptibility(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[9] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 8) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_multilevel_susceptibility__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__multilevel_susceptibility, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_multilevel_susceptibility__SWIG_2(self, args);
    }
  }
  if (argc == 8) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_double, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              void *vptr = 0;
              int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_double, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_double, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_double, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    return _wrap_new_multilevel_susceptibility__SWIG_1(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_multilevel_susceptibility'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::multilevel_susceptibility::multilevel_susceptibility()\n"
    "    meep::multilevel_susceptibility::multilevel_susceptibility(int,int,meep::realnum const *,meep::realnum const *,meep::realnum const *,meep::realnum const *,meep::realnum const *,meep::realnum const *)\n"
    "    meep::multilevel_susceptibility::multilevel_susceptibility(meep::multilevel_susceptibility const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_multilevel_susceptibility_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::multilevel_susceptibility *arg1 = (meep::multilevel_susceptibility *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::susceptibility *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "multilevel_susceptibility_clone", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__multilevel_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "multilevel_susceptibility_clone" "', argument " "1"" of type '" "meep::multilevel_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::multilevel_susceptibility * >(argp1);
  {
    try {
      result = (meep::susceptibility *)((meep::multilevel_susceptibility const *)arg1)->clone();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_multilevel_susceptibility(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::multilevel_susceptibility *arg1 = (meep::multilevel_susceptibility *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_multilevel_susceptibility", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__multilevel_susceptibility, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_multilevel_susceptibility" "', argument " "1"" of type '" "meep::multilevel_susceptibility *""'"); 
  }
  arg1 = reinterpret_cast< meep::multilevel_susceptibility * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_multilevel_susceptibility_update_P(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::multilevel_susceptibility *arg1 = (meep::multilevel_susceptibility *) 0 ;
  meep::realnum *(*arg2)[2] ;
  meep::realnum *(*arg3)[2] ;
  meep::realnum arg4 ;
  meep::grid_volume *arg5 = 0 ;
  void *arg6 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  int res6 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "multilevel_susceptibility_update_P", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__multilevel_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "multilevel_susceptibility_update_P" "', argument " "1"" of type '" "meep::multilevel_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::multilevel_susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "multilevel_susceptibility_update_P" "', argument " "2"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg2 = reinterpret_cast< meep::realnum *(*)[2] >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "multilevel_susceptibility_update_P" "', argument " "3"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg3 = reinterpret_cast< meep::realnum *(*)[2] >(argp3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "multilevel_susceptibility_update_P" "', argument " "4"" of type '" "meep::realnum""'");
  } 
  arg4 = static_cast< meep::realnum >(val4);
  res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "multilevel_susceptibility_update_P" "', argument " "5"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp5) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "multilevel_susceptibility_update_P" "', argument " "5"" of type '" "meep::grid_volume const &""'"); 
  }
  arg5 = reinterpret_cast< meep::grid_volume * >(argp5);
  res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "multilevel_susceptibility_update_P" "', argument " "6"" of type '" "void *""'"); 
  }
  {
    try {
      ((meep::multilevel_susceptibility const *)arg1)->update_P((meep::realnum *(*)[2])arg2,(meep::realnum *(*)[2])arg3,arg4,(meep::grid_volume const &)*arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_multilevel_susceptibility_subtract_P(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::multilevel_susceptibility *arg1 = (meep::multilevel_susceptibility *) 0 ;
  meep::field_type arg2 ;
  meep::realnum *(*arg3)[2] ;
  void *arg4 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "multilevel_susceptibility_subtract_P", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__multilevel_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "multilevel_susceptibility_subtract_P" "', argument " "1"" of type '" "meep::multilevel_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::multilevel_susceptibility * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "multilevel_susceptibility_subtract_P" "', argument " "2"" of type '" "meep::field_type""'");
  } 
  arg2 = static_cast< meep::field_type >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "multilevel_susceptibility_subtract_P" "', argument " "3"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg3 = reinterpret_cast< meep::realnum *(*)[2] >(argp3);
  res4 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg4), 0, 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "multilevel_susceptibility_subtract_P" "', argument " "4"" of type '" "void *""'"); 
  }
  {
    try {
      ((meep::multilevel_susceptibility const *)arg1)->subtract_P(arg2,(meep::realnum *(*)[2])arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_multilevel_susceptibility_new_internal_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::multilevel_susceptibility *arg1 = (meep::multilevel_susceptibility *) 0 ;
  meep::realnum *(*arg2)[2] ;
  meep::grid_volume *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "multilevel_susceptibility_new_internal_data", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__multilevel_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "multilevel_susceptibility_new_internal_data" "', argument " "1"" of type '" "meep::multilevel_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::multilevel_susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "multilevel_susceptibility_new_internal_data" "', argument " "2"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg2 = reinterpret_cast< meep::realnum *(*)[2] >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "multilevel_susceptibility_new_internal_data" "', argument " "3"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "multilevel_susceptibility_new_internal_data" "', argument " "3"" of type '" "meep::grid_volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::grid_volume * >(argp3);
  {
    try {
      result = (void *)((meep::multilevel_susceptibility const *)arg1)->new_internal_data((meep::realnum *(*)[2])arg2,(meep::grid_volume const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_multilevel_susceptibility_init_internal_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::multilevel_susceptibility *arg1 = (meep::multilevel_susceptibility *) 0 ;
  meep::realnum *(*arg2)[2] ;
  meep::realnum arg3 ;
  meep::grid_volume *arg4 = 0 ;
  void *arg5 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int res5 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "multilevel_susceptibility_init_internal_data", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__multilevel_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "multilevel_susceptibility_init_internal_data" "', argument " "1"" of type '" "meep::multilevel_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::multilevel_susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "multilevel_susceptibility_init_internal_data" "', argument " "2"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg2 = reinterpret_cast< meep::realnum *(*)[2] >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "multilevel_susceptibility_init_internal_data" "', argument " "3"" of type '" "meep::realnum""'");
  } 
  arg3 = static_cast< meep::realnum >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "multilevel_susceptibility_init_internal_data" "', argument " "4"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "multilevel_susceptibility_init_internal_data" "', argument " "4"" of type '" "meep::grid_volume const &""'"); 
  }
  arg4 = reinterpret_cast< meep::grid_volume * >(argp4);
  res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "multilevel_susceptibility_init_internal_data" "', argument " "5"" of type '" "void *""'"); 
  }
  {
    try {
      ((meep::multilevel_susceptibility const *)arg1)->init_internal_data((meep::realnum *(*)[2])arg2,arg3,(meep::grid_volume const &)*arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_multilevel_susceptibility_copy_internal_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::multilevel_susceptibility *arg1 = (meep::multilevel_susceptibility *) 0 ;
  void *arg2 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "multilevel_susceptibility_copy_internal_data", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__multilevel_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "multilevel_susceptibility_copy_internal_data" "', argument " "1"" of type '" "meep::multilevel_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::multilevel_susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "multilevel_susceptibility_copy_internal_data" "', argument " "2"" of type '" "void *""'"); 
  }
  {
    try {
      result = (void *)((meep::multilevel_susceptibility const *)arg1)->copy_internal_data(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_multilevel_susceptibility_delete_internal_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::multilevel_susceptibility *arg1 = (meep::multilevel_susceptibility *) 0 ;
  void *arg2 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "multilevel_susceptibility_delete_internal_data", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__multilevel_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "multilevel_susceptibility_delete_internal_data" "', argument " "1"" of type '" "meep::multilevel_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::multilevel_susceptibility * >(argp1);
  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "multilevel_susceptibility_delete_internal_data" "', argument " "2"" of type '" "void *""'"); 
  }
  {
    try {
      ((meep::multilevel_susceptibility const *)arg1)->delete_internal_data(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_multilevel_susceptibility_num_cinternal_notowned_needed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::multilevel_susceptibility *arg1 = (meep::multilevel_susceptibility *) 0 ;
  meep::component arg2 ;
  void *arg3 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "multilevel_susceptibility_num_cinternal_notowned_needed", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__multilevel_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "multilevel_susceptibility_num_cinternal_notowned_needed" "', argument " "1"" of type '" "meep::multilevel_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::multilevel_susceptibility * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "multilevel_susceptibility_num_cinternal_notowned_needed" "', argument " "3"" of type '" "void *""'"); 
  }
  {
    try {
      result = (int)((meep::multilevel_susceptibility const *)arg1)->num_cinternal_notowned_needed(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_multilevel_susceptibility_cinternal_notowned_ptr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::multilevel_susceptibility *arg1 = (meep::multilevel_susceptibility *) 0 ;
  int arg2 ;
  meep::component arg3 ;
  int arg4 ;
  int arg5 ;
  void *arg6 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int res6 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  meep::realnum *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "multilevel_susceptibility_cinternal_notowned_ptr", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__multilevel_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "multilevel_susceptibility_cinternal_notowned_ptr" "', argument " "1"" of type '" "meep::multilevel_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::multilevel_susceptibility * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "multilevel_susceptibility_cinternal_notowned_ptr" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    arg3 = static_cast<meep::component>(PyInteger_AsLong(obj2));
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "multilevel_susceptibility_cinternal_notowned_ptr" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "multilevel_susceptibility_cinternal_notowned_ptr" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "multilevel_susceptibility_cinternal_notowned_ptr" "', argument " "6"" of type '" "void *""'"); 
  }
  {
    try {
      result = (meep::realnum *)((meep::multilevel_susceptibility const *)arg1)->cinternal_notowned_ptr(arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_multilevel_susceptibility_needs_W_notowned(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::multilevel_susceptibility *arg1 = (meep::multilevel_susceptibility *) 0 ;
  meep::component arg2 ;
  meep::realnum *(*arg3)[2] ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "multilevel_susceptibility_needs_W_notowned", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__multilevel_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "multilevel_susceptibility_needs_W_notowned" "', argument " "1"" of type '" "meep::multilevel_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::multilevel_susceptibility * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_a_2__p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "multilevel_susceptibility_needs_W_notowned" "', argument " "3"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][2]""'"); 
  } 
  arg3 = reinterpret_cast< meep::realnum *(*)[2] >(argp3);
  {
    try {
      result = (bool)((meep::multilevel_susceptibility const *)arg1)->needs_W_notowned(arg2,(meep::realnum *(*)[2])arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_multilevel_susceptibility_needs_W_prev(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::multilevel_susceptibility *arg1 = (meep::multilevel_susceptibility *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "multilevel_susceptibility_needs_W_prev", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__multilevel_susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "multilevel_susceptibility_needs_W_prev" "', argument " "1"" of type '" "meep::multilevel_susceptibility const *""'"); 
  }
  arg1 = reinterpret_cast< meep::multilevel_susceptibility * >(argp1);
  {
    try {
      result = (bool)((meep::multilevel_susceptibility const *)arg1)->needs_W_prev();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *multilevel_susceptibility_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__multilevel_susceptibility, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *multilevel_susceptibility_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_h5file__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  meep::h5file::access_mode arg2 ;
  bool arg3 ;
  bool arg4 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::h5file *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_h5file", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_h5file" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_h5file" "', argument " "2"" of type '" "meep::h5file::access_mode""'");
  } 
  arg2 = static_cast< meep::h5file::access_mode >(val2);
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_h5file" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_h5file" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  {
    try {
      result = (meep::h5file *)new meep::h5file((char const *)arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__h5file, SWIG_POINTER_NEW |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_h5file__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  meep::h5file::access_mode arg2 ;
  bool arg3 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::h5file *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_h5file", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_h5file" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_h5file" "', argument " "2"" of type '" "meep::h5file::access_mode""'");
  } 
  arg2 = static_cast< meep::h5file::access_mode >(val2);
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_h5file" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      result = (meep::h5file *)new meep::h5file((char const *)arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__h5file, SWIG_POINTER_NEW |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_h5file__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  meep::h5file::access_mode arg2 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::h5file *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_h5file", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_h5file" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_h5file" "', argument " "2"" of type '" "meep::h5file::access_mode""'");
  } 
  arg2 = static_cast< meep::h5file::access_mode >(val2);
  {
    try {
      result = (meep::h5file *)new meep::h5file((char const *)arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__h5file, SWIG_POINTER_NEW |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_h5file__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::h5file *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_h5file", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_h5file" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    try {
      result = (meep::h5file *)new meep::h5file((char const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__h5file, SWIG_POINTER_NEW |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_h5file(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_h5file__SWIG_3(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_h5file__SWIG_2(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_bool(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new_h5file__SWIG_1(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_bool(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_new_h5file__SWIG_0(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_h5file'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::h5file::h5file(char const *,meep::h5file::access_mode,bool,bool)\n"
    "    meep::h5file::h5file(char const *,meep::h5file::access_mode,bool)\n"
    "    meep::h5file::h5file(char const *,meep::h5file::access_mode)\n"
    "    meep::h5file::h5file(char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_h5file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_h5file", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_h5file" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_ok(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "h5file_ok", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_ok" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  {
    try {
      result = (bool)(arg1)->ok();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_read__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  char *arg2 = (char *) 0 ;
  int *arg3 = (int *) 0 ;
  size_t *arg4 = (size_t *) 0 ;
  int arg5 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_read", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_read" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "h5file_read" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "h5file_read" "', argument " "3"" of type '" "int *""'"); 
  }
  arg3 = reinterpret_cast< int * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "h5file_read" "', argument " "4"" of type '" "size_t *""'"); 
  }
  arg4 = reinterpret_cast< size_t * >(argp4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "h5file_read" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "h5file_read" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      result = (void *)(arg1)->read((char const *)arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_read__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  char *arg2 = (char *) 0 ;
  int *arg3 = (int *) 0 ;
  size_t *arg4 = (size_t *) 0 ;
  int arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_read", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_read" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "h5file_read" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "h5file_read" "', argument " "3"" of type '" "int *""'"); 
  }
  arg3 = reinterpret_cast< int * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "h5file_read" "', argument " "4"" of type '" "size_t *""'"); 
  }
  arg4 = reinterpret_cast< size_t * >(argp4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "h5file_read" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    try {
      result = (void *)(arg1)->read((char const *)arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_write__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  size_t *arg4 = (size_t *) 0 ;
  void *arg5 = (void *) 0 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int res5 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_write", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_write" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "h5file_write" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "h5file_write" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "h5file_write" "', argument " "4"" of type '" "size_t const *""'"); 
  }
  arg4 = reinterpret_cast< size_t * >(argp4);
  res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "h5file_write" "', argument " "5"" of type '" "void *""'"); 
  }
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "h5file_write" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      (arg1)->write((char const *)arg2,arg3,(size_t const *)arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_write__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  size_t *arg4 = (size_t *) 0 ;
  void *arg5 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int res5 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_write", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_write" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "h5file_write" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "h5file_write" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "h5file_write" "', argument " "4"" of type '" "size_t const *""'"); 
  }
  arg4 = reinterpret_cast< size_t * >(argp4);
  res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "h5file_write" "', argument " "5"" of type '" "void *""'"); 
  }
  {
    try {
      (arg1)->write((char const *)arg2,arg3,(size_t const *)arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_read__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_read", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_read" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "h5file_read" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try {
      result = (char *)(arg1)->read((char const *)arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_read(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[7] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__h5file, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_h5file_read__SWIG_2(self, args);
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__h5file, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_size_t, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_h5file_read__SWIG_1(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__h5file, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_size_t, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_h5file_read__SWIG_0(self, args);
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'h5file_read'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::h5file::read(char const *,int *,size_t *,int,bool)\n"
    "    meep::h5file::read(char const *,int *,size_t *,int)\n"
    "    meep::h5file::read(char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_h5file_write__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_write", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_write" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "h5file_write" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "h5file_write" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try {
      (arg1)->write((char const *)arg2,(char const *)arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_write(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[7] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__h5file, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_h5file_write__SWIG_2(self, args);
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__h5file, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_size_t, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &ptr, 0, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_h5file_write__SWIG_1(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__h5file, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_size_t, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &ptr, 0, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_h5file_write__SWIG_0(self, args);
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'h5file_write'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::h5file::write(char const *,int,size_t const *,void *,bool)\n"
    "    meep::h5file::write(char const *,int,size_t const *,void *)\n"
    "    meep::h5file::write(char const *,char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_h5file_create_data__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  size_t *arg4 = (size_t *) 0 ;
  bool arg5 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_create_data", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_create_data" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "h5file_create_data" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "h5file_create_data" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "h5file_create_data" "', argument " "4"" of type '" "size_t const *""'"); 
  }
  arg4 = reinterpret_cast< size_t * >(argp4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "h5file_create_data" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "h5file_create_data" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      (arg1)->create_data((char const *)arg2,arg3,(size_t const *)arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_create_data__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  size_t *arg4 = (size_t *) 0 ;
  bool arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_create_data", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_create_data" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "h5file_create_data" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "h5file_create_data" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "h5file_create_data" "', argument " "4"" of type '" "size_t const *""'"); 
  }
  arg4 = reinterpret_cast< size_t * >(argp4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "h5file_create_data" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  {
    try {
      (arg1)->create_data((char const *)arg2,arg3,(size_t const *)arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_create_data__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  size_t *arg4 = (size_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_create_data", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_create_data" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "h5file_create_data" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "h5file_create_data" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "h5file_create_data" "', argument " "4"" of type '" "size_t const *""'"); 
  }
  arg4 = reinterpret_cast< size_t * >(argp4);
  {
    try {
      (arg1)->create_data((char const *)arg2,arg3,(size_t const *)arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_create_data(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[7] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__h5file, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_size_t, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_h5file_create_data__SWIG_2(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__h5file, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_size_t, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_h5file_create_data__SWIG_1(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__h5file, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_size_t, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_h5file_create_data__SWIG_0(self, args);
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'h5file_create_data'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::h5file::create_data(char const *,int,size_t const *,bool,bool)\n"
    "    meep::h5file::create_data(char const *,int,size_t const *,bool)\n"
    "    meep::h5file::create_data(char const *,int,size_t const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_h5file_extend_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  size_t *arg4 = (size_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_extend_data", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_extend_data" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "h5file_extend_data" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "h5file_extend_data" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "h5file_extend_data" "', argument " "4"" of type '" "size_t const *""'"); 
  }
  arg4 = reinterpret_cast< size_t * >(argp4);
  {
    try {
      (arg1)->extend_data((char const *)arg2,arg3,(size_t const *)arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_create_or_extend_data__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  size_t *arg4 = (size_t *) 0 ;
  bool arg5 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_create_or_extend_data", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_create_or_extend_data" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "h5file_create_or_extend_data" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "h5file_create_or_extend_data" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "h5file_create_or_extend_data" "', argument " "4"" of type '" "size_t const *""'"); 
  }
  arg4 = reinterpret_cast< size_t * >(argp4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "h5file_create_or_extend_data" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "h5file_create_or_extend_data" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      (arg1)->create_or_extend_data((char const *)arg2,arg3,(size_t const *)arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_create_or_extend_data__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  size_t *arg4 = (size_t *) 0 ;
  bool arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_create_or_extend_data", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_create_or_extend_data" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "h5file_create_or_extend_data" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "h5file_create_or_extend_data" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "h5file_create_or_extend_data" "', argument " "4"" of type '" "size_t const *""'"); 
  }
  arg4 = reinterpret_cast< size_t * >(argp4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "h5file_create_or_extend_data" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  {
    try {
      (arg1)->create_or_extend_data((char const *)arg2,arg3,(size_t const *)arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_create_or_extend_data(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[7] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__h5file, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_size_t, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_h5file_create_or_extend_data__SWIG_1(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__h5file, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_size_t, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_h5file_create_or_extend_data__SWIG_0(self, args);
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'h5file_create_or_extend_data'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::h5file::create_or_extend_data(char const *,int,size_t const *,bool,bool)\n"
    "    meep::h5file::create_or_extend_data(char const *,int,size_t const *,bool)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_h5file_write_chunk__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  int arg2 ;
  size_t *arg3 = (size_t *) 0 ;
  size_t *arg4 = (size_t *) 0 ;
  float *arg5 = (float *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_write_chunk", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_write_chunk" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "h5file_write_chunk" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "h5file_write_chunk" "', argument " "3"" of type '" "size_t const *""'"); 
  }
  arg3 = reinterpret_cast< size_t * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "h5file_write_chunk" "', argument " "4"" of type '" "size_t const *""'"); 
  }
  arg4 = reinterpret_cast< size_t * >(argp4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "h5file_write_chunk" "', argument " "5"" of type '" "float *""'"); 
  }
  arg5 = reinterpret_cast< float * >(argp5);
  {
    try {
      (arg1)->write_chunk(arg2,(size_t const *)arg3,(size_t const *)arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_write_chunk__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  int arg2 ;
  size_t *arg3 = (size_t *) 0 ;
  size_t *arg4 = (size_t *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_write_chunk", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_write_chunk" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "h5file_write_chunk" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "h5file_write_chunk" "', argument " "3"" of type '" "size_t const *""'"); 
  }
  arg3 = reinterpret_cast< size_t * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "h5file_write_chunk" "', argument " "4"" of type '" "size_t const *""'"); 
  }
  arg4 = reinterpret_cast< size_t * >(argp4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "h5file_write_chunk" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = reinterpret_cast< double * >(argp5);
  {
    try {
      (arg1)->write_chunk(arg2,(size_t const *)arg3,(size_t const *)arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_write_chunk__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  int arg2 ;
  size_t *arg3 = (size_t *) 0 ;
  size_t *arg4 = (size_t *) 0 ;
  size_t *arg5 = (size_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_write_chunk", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_write_chunk" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "h5file_write_chunk" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "h5file_write_chunk" "', argument " "3"" of type '" "size_t const *""'"); 
  }
  arg3 = reinterpret_cast< size_t * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "h5file_write_chunk" "', argument " "4"" of type '" "size_t const *""'"); 
  }
  arg4 = reinterpret_cast< size_t * >(argp4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "h5file_write_chunk" "', argument " "5"" of type '" "size_t *""'"); 
  }
  arg5 = reinterpret_cast< size_t * >(argp5);
  {
    try {
      (arg1)->write_chunk(arg2,(size_t const *)arg3,(size_t const *)arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_write_chunk(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__h5file, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_size_t, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_size_t, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_float, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_h5file_write_chunk__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__h5file, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_size_t, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_size_t, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_double, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_h5file_write_chunk__SWIG_1(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__h5file, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_size_t, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_size_t, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_size_t, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_h5file_write_chunk__SWIG_2(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'h5file_write_chunk'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::h5file::write_chunk(int,size_t const *,size_t const *,float *)\n"
    "    meep::h5file::write_chunk(int,size_t const *,size_t const *,double *)\n"
    "    meep::h5file::write_chunk(int,size_t const *,size_t const *,size_t *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_h5file_done_writing_chunks(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_done_writing_chunks", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_done_writing_chunks" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  {
    try {
      (arg1)->done_writing_chunks();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_read_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  char *arg2 = (char *) 0 ;
  int *arg3 = (int *) 0 ;
  size_t *arg4 = (size_t *) 0 ;
  int arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_read_size", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_read_size" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "h5file_read_size" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "h5file_read_size" "', argument " "3"" of type '" "int *""'"); 
  }
  arg3 = reinterpret_cast< int * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "h5file_read_size" "', argument " "4"" of type '" "size_t *""'"); 
  }
  arg4 = reinterpret_cast< size_t * >(argp4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "h5file_read_size" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    try {
      (arg1)->read_size((char const *)arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_read_chunk__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  int arg2 ;
  size_t *arg3 = (size_t *) 0 ;
  size_t *arg4 = (size_t *) 0 ;
  float *arg5 = (float *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_read_chunk", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_read_chunk" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "h5file_read_chunk" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "h5file_read_chunk" "', argument " "3"" of type '" "size_t const *""'"); 
  }
  arg3 = reinterpret_cast< size_t * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "h5file_read_chunk" "', argument " "4"" of type '" "size_t const *""'"); 
  }
  arg4 = reinterpret_cast< size_t * >(argp4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "h5file_read_chunk" "', argument " "5"" of type '" "float *""'"); 
  }
  arg5 = reinterpret_cast< float * >(argp5);
  {
    try {
      (arg1)->read_chunk(arg2,(size_t const *)arg3,(size_t const *)arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_read_chunk__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  int arg2 ;
  size_t *arg3 = (size_t *) 0 ;
  size_t *arg4 = (size_t *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_read_chunk", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_read_chunk" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "h5file_read_chunk" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "h5file_read_chunk" "', argument " "3"" of type '" "size_t const *""'"); 
  }
  arg3 = reinterpret_cast< size_t * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "h5file_read_chunk" "', argument " "4"" of type '" "size_t const *""'"); 
  }
  arg4 = reinterpret_cast< size_t * >(argp4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "h5file_read_chunk" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = reinterpret_cast< double * >(argp5);
  {
    try {
      (arg1)->read_chunk(arg2,(size_t const *)arg3,(size_t const *)arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_read_chunk__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  int arg2 ;
  size_t *arg3 = (size_t *) 0 ;
  size_t *arg4 = (size_t *) 0 ;
  size_t *arg5 = (size_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_read_chunk", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_read_chunk" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "h5file_read_chunk" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "h5file_read_chunk" "', argument " "3"" of type '" "size_t const *""'"); 
  }
  arg3 = reinterpret_cast< size_t * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "h5file_read_chunk" "', argument " "4"" of type '" "size_t const *""'"); 
  }
  arg4 = reinterpret_cast< size_t * >(argp4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "h5file_read_chunk" "', argument " "5"" of type '" "size_t *""'"); 
  }
  arg5 = reinterpret_cast< size_t * >(argp5);
  {
    try {
      (arg1)->read_chunk(arg2,(size_t const *)arg3,(size_t const *)arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_read_chunk(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__h5file, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_size_t, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_size_t, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_float, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_h5file_read_chunk__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__h5file, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_size_t, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_size_t, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_double, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_h5file_read_chunk__SWIG_1(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__h5file, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_size_t, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_size_t, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_size_t, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_h5file_read_chunk__SWIG_2(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'h5file_read_chunk'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::h5file::read_chunk(int,size_t const *,size_t const *,float *)\n"
    "    meep::h5file::read_chunk(int,size_t const *,size_t const *,double *)\n"
    "    meep::h5file::read_chunk(int,size_t const *,size_t const *,size_t *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_h5file_remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_remove", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_remove" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  {
    try {
      (arg1)->remove();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_remove_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_remove_data", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_remove_data" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "h5file_remove_data" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try {
      (arg1)->remove_data((char const *)arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_file_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_file_name", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_file_name" "', argument " "1"" of type '" "meep::h5file const *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  {
    try {
      result = (char *)((meep::h5file const *)arg1)->file_name();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_prevent_deadlock(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_prevent_deadlock", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_prevent_deadlock" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  {
    try {
      (arg1)->prevent_deadlock();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_dataset_exists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "h5file_dataset_exists", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_dataset_exists" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "h5file_dataset_exists" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try {
      result = (bool)(arg1)->dataset_exists((char const *)arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_extending_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  meep::h5file::extending_s *arg2 = (meep::h5file::extending_s *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_extending_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_extending_set" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__h5file__extending_s, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "h5file_extending_set" "', argument " "2"" of type '" "meep::h5file::extending_s *""'"); 
  }
  arg2 = reinterpret_cast< meep::h5file::extending_s * >(argp2);
  if (arg1) (arg1)->extending = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_extending_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::h5file::extending_s *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_extending_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_extending_get" "', argument " "1"" of type '" "meep::h5file *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  result = (meep::h5file::extending_s *) ((arg1)->extending);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__h5file__extending_s, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_h5file_get_extending(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::h5file *arg1 = (meep::h5file *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::h5file::extending_s *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "h5file_get_extending", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "h5file_get_extending" "', argument " "1"" of type '" "meep::h5file const *""'"); 
  }
  arg1 = reinterpret_cast< meep::h5file * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "h5file_get_extending" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try {
      result = (meep::h5file::extending_s *)((meep::h5file const *)arg1)->get_extending((char const *)arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__h5file__extending_s, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *h5file_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__h5file, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *h5file_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_material_function(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::material_function *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_material_function", 0, 0)) SWIG_fail;
  {
    try {
      result = (meep::material_function *)new meep::material_function();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__material_function, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_material_function(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::material_function *arg1 = (meep::material_function *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_material_function", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__material_function, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_material_function" "', argument " "1"" of type '" "meep::material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::material_function * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_material_function_set_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::material_function *arg1 = (meep::material_function *) 0 ;
  meep::volume *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "material_function_set_volume", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__material_function, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "material_function_set_volume" "', argument " "1"" of type '" "meep::material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::material_function * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "material_function_set_volume" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "material_function_set_volume" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    try {
      (arg1)->set_volume((meep::volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_material_function_unset_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::material_function *arg1 = (meep::material_function *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "material_function_unset_volume", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__material_function, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "material_function_unset_volume" "', argument " "1"" of type '" "meep::material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::material_function * >(argp1);
  {
    try {
      (arg1)->unset_volume();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_material_function_chi1p1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::material_function *arg1 = (meep::material_function *) 0 ;
  meep::field_type arg2 ;
  meep::vec *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "material_function_chi1p1", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__material_function, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "material_function_chi1p1" "', argument " "1"" of type '" "meep::material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::material_function * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "material_function_chi1p1" "', argument " "2"" of type '" "meep::field_type""'");
  } 
  arg2 = static_cast< meep::field_type >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "material_function_chi1p1" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "material_function_chi1p1" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  {
    try {
      result = (double)(arg1)->chi1p1(arg2,(meep::vec const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_material_function_eps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::material_function *arg1 = (meep::material_function *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "material_function_eps", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__material_function, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "material_function_eps" "', argument " "1"" of type '" "meep::material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::material_function * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "material_function_eps" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "material_function_eps" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = (double)(arg1)->eps((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_material_function_has_mu(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::material_function *arg1 = (meep::material_function *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "material_function_has_mu", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__material_function, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "material_function_has_mu" "', argument " "1"" of type '" "meep::material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::material_function * >(argp1);
  {
    try {
      result = (bool)(arg1)->has_mu();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_material_function_mu(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::material_function *arg1 = (meep::material_function *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "material_function_mu", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__material_function, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "material_function_mu" "', argument " "1"" of type '" "meep::material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::material_function * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "material_function_mu" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "material_function_mu" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = (double)(arg1)->mu((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_material_function_has_conductivity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::material_function *arg1 = (meep::material_function *) 0 ;
  meep::component arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "material_function_has_conductivity", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__material_function, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "material_function_has_conductivity" "', argument " "1"" of type '" "meep::material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::material_function * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    try {
      result = (bool)(arg1)->has_conductivity(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_material_function_conductivity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::material_function *arg1 = (meep::material_function *) 0 ;
  meep::component arg2 ;
  meep::vec *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "material_function_conductivity", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__material_function, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "material_function_conductivity" "', argument " "1"" of type '" "meep::material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::material_function * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "material_function_conductivity" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "material_function_conductivity" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  {
    try {
      result = (double)(arg1)->conductivity(arg2,(meep::vec const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_material_function_normal_vector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::material_function *arg1 = (meep::material_function *) 0 ;
  meep::field_type arg2 ;
  meep::volume *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "material_function_normal_vector", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__material_function, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "material_function_normal_vector" "', argument " "1"" of type '" "meep::material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::material_function * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "material_function_normal_vector" "', argument " "2"" of type '" "meep::field_type""'");
  } 
  arg2 = static_cast< meep::field_type >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "material_function_normal_vector" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "material_function_normal_vector" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    try {
      result = (arg1)->normal_vector(arg2,(meep::volume const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_material_function_eff_chi1inv_row__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::material_function *arg1 = (meep::material_function *) 0 ;
  meep::component arg2 ;
  double *arg3 ;
  meep::volume *arg4 = 0 ;
  double arg5 ;
  int arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyArrayObject *array3 = NULL ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "material_function_eff_chi1inv_row", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__material_function, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "material_function_eff_chi1inv_row" "', argument " "1"" of type '" "meep::material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::material_function * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    npy_intp size[1] = {
      3 
    };
    array3 = obj_to_array_no_conversion(obj2, NPY_DOUBLE);
    if (!array3 || !require_dimensions(array3,1) || !require_size(array3, size, 1) ||
      !require_contiguous(array3) || !require_native(array3)) SWIG_fail;
    arg3 = (double *) array_data(array3);
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "material_function_eff_chi1inv_row" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "material_function_eff_chi1inv_row" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  arg4 = reinterpret_cast< meep::volume * >(argp4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "material_function_eff_chi1inv_row" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "material_function_eff_chi1inv_row" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  {
    try {
      (arg1)->eff_chi1inv_row(arg2,arg3,(meep::volume const &)*arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_material_function_eff_chi1inv_row__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::material_function *arg1 = (meep::material_function *) 0 ;
  meep::component arg2 ;
  double *arg3 ;
  meep::volume *arg4 = 0 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyArrayObject *array3 = NULL ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "material_function_eff_chi1inv_row", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__material_function, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "material_function_eff_chi1inv_row" "', argument " "1"" of type '" "meep::material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::material_function * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    npy_intp size[1] = {
      3 
    };
    array3 = obj_to_array_no_conversion(obj2, NPY_DOUBLE);
    if (!array3 || !require_dimensions(array3,1) || !require_size(array3, size, 1) ||
      !require_contiguous(array3) || !require_native(array3)) SWIG_fail;
    arg3 = (double *) array_data(array3);
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "material_function_eff_chi1inv_row" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "material_function_eff_chi1inv_row" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  arg4 = reinterpret_cast< meep::volume * >(argp4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "material_function_eff_chi1inv_row" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      (arg1)->eff_chi1inv_row(arg2,arg3,(meep::volume const &)*arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_material_function_eff_chi1inv_row__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::material_function *arg1 = (meep::material_function *) 0 ;
  meep::component arg2 ;
  double *arg3 ;
  meep::volume *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyArrayObject *array3 = NULL ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "material_function_eff_chi1inv_row", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__material_function, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "material_function_eff_chi1inv_row" "', argument " "1"" of type '" "meep::material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::material_function * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    npy_intp size[1] = {
      3 
    };
    array3 = obj_to_array_no_conversion(obj2, NPY_DOUBLE);
    if (!array3 || !require_dimensions(array3,1) || !require_size(array3, size, 1) ||
      !require_contiguous(array3) || !require_native(array3)) SWIG_fail;
    arg3 = (double *) array_data(array3);
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "material_function_eff_chi1inv_row" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "material_function_eff_chi1inv_row" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  arg4 = reinterpret_cast< meep::volume * >(argp4);
  {
    try {
      (arg1)->eff_chi1inv_row(arg2,arg3,(meep::volume const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_material_function_eff_chi1inv_row(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[7] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__material_function, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          _v = is_array(argv[2]) && PyArray_EquivTypenums(array_type(argv[2]),
            NPY_DOUBLE);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_material_function_eff_chi1inv_row__SWIG_2(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__material_function, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          _v = is_array(argv[2]) && PyArray_EquivTypenums(array_type(argv[2]),
            NPY_DOUBLE);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_material_function_eff_chi1inv_row__SWIG_1(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__material_function, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          _v = is_array(argv[2]) && PyArray_EquivTypenums(array_type(argv[2]),
            NPY_DOUBLE);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_material_function_eff_chi1inv_row__SWIG_0(self, args);
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'material_function_eff_chi1inv_row'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::material_function::eff_chi1inv_row(meep::component,double [3],meep::volume const &,double,int)\n"
    "    meep::material_function::eff_chi1inv_row(meep::component,double [3],meep::volume const &,double)\n"
    "    meep::material_function::eff_chi1inv_row(meep::component,double [3],meep::volume const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_material_function_sigma_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::material_function *arg1 = (meep::material_function *) 0 ;
  meep::component arg2 ;
  double *arg3 ;
  meep::vec *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyArrayObject *array3 = NULL ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "material_function_sigma_row", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__material_function, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "material_function_sigma_row" "', argument " "1"" of type '" "meep::material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::material_function * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    npy_intp size[1] = {
      3 
    };
    array3 = obj_to_array_no_conversion(obj2, NPY_DOUBLE);
    if (!array3 || !require_dimensions(array3,1) || !require_size(array3, size, 1) ||
      !require_contiguous(array3) || !require_native(array3)) SWIG_fail;
    arg3 = (double *) array_data(array3);
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "material_function_sigma_row" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "material_function_sigma_row" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::vec * >(argp4);
  {
    try {
      (arg1)->sigma_row(arg2,arg3,(meep::vec const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_material_function_has_chi3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::material_function *arg1 = (meep::material_function *) 0 ;
  meep::component arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "material_function_has_chi3", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__material_function, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "material_function_has_chi3" "', argument " "1"" of type '" "meep::material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::material_function * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    try {
      result = (bool)(arg1)->has_chi3(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_material_function_chi3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::material_function *arg1 = (meep::material_function *) 0 ;
  meep::component arg2 ;
  meep::vec *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "material_function_chi3", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__material_function, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "material_function_chi3" "', argument " "1"" of type '" "meep::material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::material_function * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "material_function_chi3" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "material_function_chi3" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  {
    try {
      result = (double)(arg1)->chi3(arg2,(meep::vec const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_material_function_has_chi2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::material_function *arg1 = (meep::material_function *) 0 ;
  meep::component arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "material_function_has_chi2", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__material_function, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "material_function_has_chi2" "', argument " "1"" of type '" "meep::material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::material_function * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    try {
      result = (bool)(arg1)->has_chi2(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_material_function_chi2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::material_function *arg1 = (meep::material_function *) 0 ;
  meep::component arg2 ;
  meep::vec *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "material_function_chi2", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__material_function, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "material_function_chi2" "', argument " "1"" of type '" "meep::material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::material_function * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "material_function_chi2" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "material_function_chi2" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  {
    try {
      result = (double)(arg1)->chi2(arg2,(meep::vec const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *material_function_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__material_function, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *material_function_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_simple_material_function(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double (*arg1)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ;
  PyObject * obj0 = 0 ;
  meep::simple_material_function *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_simple_material_function", 1, 1, &obj0)) SWIG_fail;
  {
    if (obj0 == Py_None) {
      arg1 = NULL;
      py_callback = NULL;
    } else {
      arg1 = py_callback_wrap;
      py_callback = obj0;
      Py_INCREF(py_callback);
    }
  }
  {
    try {
      result = (meep::simple_material_function *)new meep::simple_material_function(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__simple_material_function, SWIG_POINTER_NEW |  0 );
  {
    Py_XDECREF(py_callback);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_callback);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_simple_material_function(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::simple_material_function *arg1 = (meep::simple_material_function *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_simple_material_function", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__simple_material_function, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_simple_material_function" "', argument " "1"" of type '" "meep::simple_material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::simple_material_function * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_simple_material_function_chi1p1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::simple_material_function *arg1 = (meep::simple_material_function *) 0 ;
  meep::field_type arg2 ;
  meep::vec *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "simple_material_function_chi1p1", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__simple_material_function, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "simple_material_function_chi1p1" "', argument " "1"" of type '" "meep::simple_material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::simple_material_function * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "simple_material_function_chi1p1" "', argument " "2"" of type '" "meep::field_type""'");
  } 
  arg2 = static_cast< meep::field_type >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "simple_material_function_chi1p1" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "simple_material_function_chi1p1" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  {
    try {
      result = (double)(arg1)->chi1p1(arg2,(meep::vec const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_simple_material_function_eps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::simple_material_function *arg1 = (meep::simple_material_function *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "simple_material_function_eps", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__simple_material_function, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "simple_material_function_eps" "', argument " "1"" of type '" "meep::simple_material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::simple_material_function * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "simple_material_function_eps" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "simple_material_function_eps" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = (double)(arg1)->eps((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_simple_material_function_mu(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::simple_material_function *arg1 = (meep::simple_material_function *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "simple_material_function_mu", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__simple_material_function, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "simple_material_function_mu" "', argument " "1"" of type '" "meep::simple_material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::simple_material_function * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "simple_material_function_mu" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "simple_material_function_mu" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = (double)(arg1)->mu((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_simple_material_function_conductivity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::simple_material_function *arg1 = (meep::simple_material_function *) 0 ;
  meep::component arg2 ;
  meep::vec *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "simple_material_function_conductivity", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__simple_material_function, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "simple_material_function_conductivity" "', argument " "1"" of type '" "meep::simple_material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::simple_material_function * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "simple_material_function_conductivity" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "simple_material_function_conductivity" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  {
    try {
      result = (double)(arg1)->conductivity(arg2,(meep::vec const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_simple_material_function_sigma_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::simple_material_function *arg1 = (meep::simple_material_function *) 0 ;
  meep::component arg2 ;
  double *arg3 ;
  meep::vec *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyArrayObject *array3 = NULL ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "simple_material_function_sigma_row", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__simple_material_function, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "simple_material_function_sigma_row" "', argument " "1"" of type '" "meep::simple_material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::simple_material_function * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    npy_intp size[1] = {
      3 
    };
    array3 = obj_to_array_no_conversion(obj2, NPY_DOUBLE);
    if (!array3 || !require_dimensions(array3,1) || !require_size(array3, size, 1) ||
      !require_contiguous(array3) || !require_native(array3)) SWIG_fail;
    arg3 = (double *) array_data(array3);
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "simple_material_function_sigma_row" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "simple_material_function_sigma_row" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::vec * >(argp4);
  {
    try {
      (arg1)->sigma_row(arg2,arg3,(meep::vec const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_simple_material_function_chi3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::simple_material_function *arg1 = (meep::simple_material_function *) 0 ;
  meep::component arg2 ;
  meep::vec *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "simple_material_function_chi3", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__simple_material_function, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "simple_material_function_chi3" "', argument " "1"" of type '" "meep::simple_material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::simple_material_function * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "simple_material_function_chi3" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "simple_material_function_chi3" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  {
    try {
      result = (double)(arg1)->chi3(arg2,(meep::vec const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_simple_material_function_chi2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::simple_material_function *arg1 = (meep::simple_material_function *) 0 ;
  meep::component arg2 ;
  meep::vec *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "simple_material_function_chi2", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__simple_material_function, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "simple_material_function_chi2" "', argument " "1"" of type '" "meep::simple_material_function *""'"); 
  }
  arg1 = reinterpret_cast< meep::simple_material_function * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "simple_material_function_chi2" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "simple_material_function_chi2" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  {
    try {
      result = (double)(arg1)->chi2(arg2,(meep::vec const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *simple_material_function_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__simple_material_function, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *simple_material_function_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_structure_chunk_a_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_a_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_a_set" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "structure_chunk_a_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->a = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_a_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_a_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_a_get" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  result = (double) ((arg1)->a);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_Courant_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_Courant_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_Courant_set" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "structure_chunk_Courant_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->Courant = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_Courant_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_Courant_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_Courant_get" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  result = (double) ((arg1)->Courant);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_dt_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_dt_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_dt_set" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "structure_chunk_dt_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->dt = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_dt_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_dt_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_dt_get" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  result = (double) ((arg1)->dt);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_chi3_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::realnum **arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_chi3_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_chi3_set" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_chunk_chi3_set" "', argument " "2"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS]""'"); 
  } 
  arg2 = reinterpret_cast< meep::realnum ** >(argp2);
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)meep::NUM_FIELD_COMPONENTS; ++ii) *(meep::realnum * *)&arg1->chi3[ii] = *((meep::realnum * *)arg2 + ii);
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""chi3""' of type '""meep::realnum *[meep::NUM_FIELD_COMPONENTS]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_chi3_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::realnum **result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_chi3_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_chi3_get" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  result = (meep::realnum **)(meep::realnum **) ((arg1)->chi3);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_chi2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::realnum **arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_chi2_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_chi2_set" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_chunk_chi2_set" "', argument " "2"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS]""'"); 
  } 
  arg2 = reinterpret_cast< meep::realnum ** >(argp2);
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)meep::NUM_FIELD_COMPONENTS; ++ii) *(meep::realnum * *)&arg1->chi2[ii] = *((meep::realnum * *)arg2 + ii);
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""chi2""' of type '""meep::realnum *[meep::NUM_FIELD_COMPONENTS]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_chi2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::realnum **result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_chi2_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_chi2_get" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  result = (meep::realnum **)(meep::realnum **) ((arg1)->chi2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_chi1inv_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::realnum *(*arg2)[5] ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_chi1inv_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_chi1inv_set" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_a_5__p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_chunk_chi1inv_set" "', argument " "2"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][5]""'"); 
  } 
  arg2 = reinterpret_cast< meep::realnum *(*)[5] >(argp2);
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)meep::NUM_FIELD_COMPONENTS; ++ii) {
        if (arg2[ii]) {
          size_t jj = 0;
          for (; jj < (size_t)5; ++jj) arg1->chi1inv[ii][jj] = arg2[ii][jj];
        } else {
          SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""chi1inv""' of type '""meep::realnum *[meep::NUM_FIELD_COMPONENTS][5]""'");
        }
      }
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""chi1inv""' of type '""meep::realnum *[meep::NUM_FIELD_COMPONENTS][5]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_chi1inv_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::realnum *(*result)[5] = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_chi1inv_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_chi1inv_get" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  result = (meep::realnum *(*)[5])(meep::realnum *(*)[5]) ((arg1)->chi1inv);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_a_5__p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_trivial_chi1inv_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  bool (*arg2)[5] ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_trivial_chi1inv_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_trivial_chi1inv_set" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_a_5__bool, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_chunk_trivial_chi1inv_set" "', argument " "2"" of type '" "bool [meep::NUM_FIELD_COMPONENTS][5]""'"); 
  } 
  arg2 = reinterpret_cast< bool (*)[5] >(argp2);
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)meep::NUM_FIELD_COMPONENTS; ++ii) {
        if (arg2[ii]) {
          size_t jj = 0;
          for (; jj < (size_t)5; ++jj) arg1->trivial_chi1inv[ii][jj] = arg2[ii][jj];
        } else {
          SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""trivial_chi1inv""' of type '""bool [meep::NUM_FIELD_COMPONENTS][5]""'");
        }
      }
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""trivial_chi1inv""' of type '""bool [meep::NUM_FIELD_COMPONENTS][5]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_trivial_chi1inv_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool (*result)[5] = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_trivial_chi1inv_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_trivial_chi1inv_get" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  result = (bool (*)[5])(bool (*)[5]) ((arg1)->trivial_chi1inv);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_a_5__bool, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_conductivity_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::realnum *(*arg2)[5] ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_conductivity_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_conductivity_set" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_a_5__p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_chunk_conductivity_set" "', argument " "2"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][5]""'"); 
  } 
  arg2 = reinterpret_cast< meep::realnum *(*)[5] >(argp2);
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)meep::NUM_FIELD_COMPONENTS; ++ii) {
        if (arg2[ii]) {
          size_t jj = 0;
          for (; jj < (size_t)5; ++jj) arg1->conductivity[ii][jj] = arg2[ii][jj];
        } else {
          SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""conductivity""' of type '""meep::realnum *[meep::NUM_FIELD_COMPONENTS][5]""'");
        }
      }
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""conductivity""' of type '""meep::realnum *[meep::NUM_FIELD_COMPONENTS][5]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_conductivity_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::realnum *(*result)[5] = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_conductivity_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_conductivity_get" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  result = (meep::realnum *(*)[5])(meep::realnum *(*)[5]) ((arg1)->conductivity);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_a_5__p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_condinv_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::realnum *(*arg2)[5] ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_condinv_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_condinv_set" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_a_5__p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_chunk_condinv_set" "', argument " "2"" of type '" "meep::realnum *[meep::NUM_FIELD_COMPONENTS][5]""'"); 
  } 
  arg2 = reinterpret_cast< meep::realnum *(*)[5] >(argp2);
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)meep::NUM_FIELD_COMPONENTS; ++ii) {
        if (arg2[ii]) {
          size_t jj = 0;
          for (; jj < (size_t)5; ++jj) arg1->condinv[ii][jj] = arg2[ii][jj];
        } else {
          SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""condinv""' of type '""meep::realnum *[meep::NUM_FIELD_COMPONENTS][5]""'");
        }
      }
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""condinv""' of type '""meep::realnum *[meep::NUM_FIELD_COMPONENTS][5]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_condinv_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::realnum *(*result)[5] = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_condinv_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_condinv_get" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  result = (meep::realnum *(*)[5])(meep::realnum *(*)[5]) ((arg1)->condinv);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_a_5__p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_condinv_stale_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_condinv_stale_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_condinv_stale_set" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  ecode2 = SWIG_AsVal_bool(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "structure_chunk_condinv_stale_set" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  if (arg1) (arg1)->condinv_stale = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_condinv_stale_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_condinv_stale_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_condinv_stale_get" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  result = (bool) ((arg1)->condinv_stale);
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_sig_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::realnum **arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_sig_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_sig_set" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_chunk_sig_set" "', argument " "2"" of type '" "meep::realnum *[6]""'"); 
  } 
  arg2 = reinterpret_cast< meep::realnum ** >(argp2);
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)6; ++ii) *(meep::realnum * *)&arg1->sig[ii] = *((meep::realnum * *)arg2 + ii);
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""sig""' of type '""meep::realnum *[6]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_sig_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::realnum **result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_sig_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_sig_get" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  result = (meep::realnum **)(meep::realnum **) ((arg1)->sig);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_kap_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::realnum **arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_kap_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_kap_set" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_chunk_kap_set" "', argument " "2"" of type '" "meep::realnum *[6]""'"); 
  } 
  arg2 = reinterpret_cast< meep::realnum ** >(argp2);
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)6; ++ii) *(meep::realnum * *)&arg1->kap[ii] = *((meep::realnum * *)arg2 + ii);
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""kap""' of type '""meep::realnum *[6]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_kap_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::realnum **result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_kap_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_kap_get" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  result = (meep::realnum **)(meep::realnum **) ((arg1)->kap);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_siginv_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::realnum **arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_siginv_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_siginv_set" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_chunk_siginv_set" "', argument " "2"" of type '" "meep::realnum *[6]""'"); 
  } 
  arg2 = reinterpret_cast< meep::realnum ** >(argp2);
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)6; ++ii) *(meep::realnum * *)&arg1->siginv[ii] = *((meep::realnum * *)arg2 + ii);
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""siginv""' of type '""meep::realnum *[6]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_siginv_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::realnum **result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_siginv_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_siginv_get" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  result = (meep::realnum **)(meep::realnum **) ((arg1)->siginv);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_sigsize_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  int *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_sigsize_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_sigsize_set" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_chunk_sigsize_set" "', argument " "2"" of type '" "int [6]""'"); 
  } 
  arg2 = reinterpret_cast< int * >(argp2);
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)6; ++ii) *(int *)&arg1->sigsize[ii] = *((int *)arg2 + ii);
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""sigsize""' of type '""int [6]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_sigsize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_sigsize_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_sigsize_get" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  result = (int *)(int *) ((arg1)->sigsize);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_gv_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::grid_volume *arg2 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_gv_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_gv_set" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_chunk_gv_set" "', argument " "2"" of type '" "meep::grid_volume *""'"); 
  }
  arg2 = reinterpret_cast< meep::grid_volume * >(argp2);
  if (arg1) (arg1)->gv = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_gv_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::grid_volume *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_gv_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_gv_get" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  result = (meep::grid_volume *)& ((arg1)->gv);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_v_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::volume *arg2 = (meep::volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_v_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_v_set" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_chunk_v_set" "', argument " "2"" of type '" "meep::volume *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  if (arg1) (arg1)->v = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_v_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::volume *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_v_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_v_get" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  result = (meep::volume *)& ((arg1)->v);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__volume, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_chiP_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::susceptibility **arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_chiP_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_chiP_set" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_meep__susceptibility, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_chunk_chiP_set" "', argument " "2"" of type '" "meep::susceptibility *[meep::NUM_FIELD_TYPES]""'"); 
  } 
  arg2 = reinterpret_cast< meep::susceptibility ** >(argp2);
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)meep::NUM_FIELD_TYPES; ++ii) *(meep::susceptibility * *)&arg1->chiP[ii] = *((meep::susceptibility * *)arg2 + ii);
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""chiP""' of type '""meep::susceptibility *[meep::NUM_FIELD_TYPES]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_chiP_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::susceptibility **result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_chiP_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_chiP_get" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  result = (meep::susceptibility **)(meep::susceptibility **) ((arg1)->chiP);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_meep__susceptibility, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_cost_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_cost_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_cost_set" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "structure_chunk_cost_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->cost = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_cost_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_cost_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_cost_get" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  result = (double) ((arg1)->cost);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_refcount_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_refcount_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_refcount_set" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "structure_chunk_refcount_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  if (arg1) (arg1)->refcount = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_refcount_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_refcount_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_refcount_get" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  result = (int) ((arg1)->refcount);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_structure_chunk(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_structure_chunk", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_structure_chunk" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_structure_chunk__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = 0 ;
  meep::volume *arg2 = 0 ;
  double arg3 ;
  int arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::structure_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_structure_chunk", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_structure_chunk" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure_chunk" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_structure_chunk" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure_chunk" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_structure_chunk" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_structure_chunk" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    try {
      result = (meep::structure_chunk *)new meep::structure_chunk((meep::grid_volume const &)*arg1,(meep::volume const &)*arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__structure_chunk, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_structure_chunk__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::structure_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_structure_chunk", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_structure_chunk" "', argument " "1"" of type '" "meep::structure_chunk const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  {
    try {
      result = (meep::structure_chunk *)new meep::structure_chunk((meep::structure_chunk const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__structure_chunk, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_structure_chunk(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_structure_chunk__SWIG_1(self, args);
    }
  }
  if (argc == 4) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_new_structure_chunk__SWIG_0(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_structure_chunk'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::structure_chunk::structure_chunk(meep::grid_volume const &,meep::volume const &,double,int)\n"
    "    meep::structure_chunk::structure_chunk(meep::structure_chunk const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_structure_chunk_set_chi1inv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::component arg2 ;
  meep::material_function *arg3 = 0 ;
  bool arg4 ;
  double arg5 ;
  int arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_set_chi1inv", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_set_chi1inv" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "structure_chunk_set_chi1inv" "', argument " "3"" of type '" "meep::material_function &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_chunk_set_chi1inv" "', argument " "3"" of type '" "meep::material_function &""'"); 
  }
  arg3 = reinterpret_cast< meep::material_function * >(argp3);
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "structure_chunk_set_chi1inv" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "structure_chunk_set_chi1inv" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "structure_chunk_set_chi1inv" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  {
    try {
      (arg1)->set_chi1inv(arg2,*arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_has_chi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_has_chi", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_has_chi" "', argument " "1"" of type '" "meep::structure_chunk const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_chunk_has_chi" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  {
    try {
      result = (bool)((meep::structure_chunk const *)arg1)->has_chi(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_has_chisigma(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_has_chisigma", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_has_chisigma" "', argument " "1"" of type '" "meep::structure_chunk const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_chunk_has_chisigma" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  {
    try {
      result = (bool)((meep::structure_chunk const *)arg1)->has_chisigma(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_has_chi1inv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_has_chi1inv", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_has_chi1inv" "', argument " "1"" of type '" "meep::structure_chunk const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_chunk_has_chi1inv" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  {
    try {
      result = (bool)((meep::structure_chunk const *)arg1)->has_chi1inv(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_set_conductivity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::component arg2 ;
  meep::material_function *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_set_conductivity", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_set_conductivity" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "structure_chunk_set_conductivity" "', argument " "3"" of type '" "meep::material_function &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_chunk_set_conductivity" "', argument " "3"" of type '" "meep::material_function &""'"); 
  }
  arg3 = reinterpret_cast< meep::material_function * >(argp3);
  {
    try {
      (arg1)->set_conductivity(arg2,*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_update_condinv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_update_condinv", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_update_condinv" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  {
    try {
      (arg1)->update_condinv();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_set_chi3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::component arg2 ;
  meep::material_function *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_set_chi3", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_set_chi3" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "structure_chunk_set_chi3" "', argument " "3"" of type '" "meep::material_function &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_chunk_set_chi3" "', argument " "3"" of type '" "meep::material_function &""'"); 
  }
  arg3 = reinterpret_cast< meep::material_function * >(argp3);
  {
    try {
      (arg1)->set_chi3(arg2,*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_set_chi2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::component arg2 ;
  meep::material_function *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_set_chi2", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_set_chi2" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "structure_chunk_set_chi2" "', argument " "3"" of type '" "meep::material_function &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_chunk_set_chi2" "', argument " "3"" of type '" "meep::material_function &""'"); 
  }
  arg3 = reinterpret_cast< meep::material_function * >(argp3);
  {
    try {
      (arg1)->set_chi2(arg2,*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_use_pml(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::direction arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  meep::pml_profile_func arg7 = (meep::pml_profile_func) 0 ;
  void *arg8 = (void *) 0 ;
  double arg9 ;
  double arg10 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  double val9 ;
  int ecode9 = 0 ;
  double val10 ;
  int ecode10 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_use_pml", 10, 10, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_use_pml" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "structure_chunk_use_pml" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_chunk_use_pml" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "structure_chunk_use_pml" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "structure_chunk_use_pml" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "structure_chunk_use_pml" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  {
    int res = SWIG_ConvertFunctionPtr(obj6, (void**)(&arg7), SWIGTYPE_p_f_double_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "structure_chunk_use_pml" "', argument " "7"" of type '" "meep::pml_profile_func""'"); 
    }
  }
  {
    arg8 = (void*)obj7;
  }
  ecode9 = SWIG_AsVal_double(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "structure_chunk_use_pml" "', argument " "9"" of type '" "double""'");
  } 
  arg9 = static_cast< double >(val9);
  ecode10 = SWIG_AsVal_double(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "structure_chunk_use_pml" "', argument " "10"" of type '" "double""'");
  } 
  arg10 = static_cast< double >(val10);
  {
    try {
      (arg1)->use_pml(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_add_susceptibility(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::material_function *arg2 = 0 ;
  meep::field_type arg3 ;
  meep::susceptibility *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_add_susceptibility", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_add_susceptibility" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_chunk_add_susceptibility" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_chunk_add_susceptibility" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  arg2 = reinterpret_cast< meep::material_function * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_chunk_add_susceptibility" "', argument " "3"" of type '" "meep::field_type""'");
  } 
  arg3 = static_cast< meep::field_type >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__susceptibility,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "structure_chunk_add_susceptibility" "', argument " "4"" of type '" "meep::susceptibility const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_chunk_add_susceptibility" "', argument " "4"" of type '" "meep::susceptibility const &""'"); 
  }
  arg4 = reinterpret_cast< meep::susceptibility * >(argp4);
  {
    try {
      (arg1)->add_susceptibility(*arg2,arg3,(meep::susceptibility const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_mix_with(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::structure_chunk *arg2 = (meep::structure_chunk *) 0 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_mix_with", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_mix_with" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_chunk_mix_with" "', argument " "2"" of type '" "meep::structure_chunk const *""'"); 
  }
  arg2 = reinterpret_cast< meep::structure_chunk * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_chunk_mix_with" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      (arg1)->mix_with((meep::structure_chunk const *)arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_n_proc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_n_proc", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_n_proc" "', argument " "1"" of type '" "meep::structure_chunk const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  {
    try {
      result = (int)((meep::structure_chunk const *)arg1)->n_proc();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_is_mine(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_is_mine", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_is_mine" "', argument " "1"" of type '" "meep::structure_chunk const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  {
    try {
      result = (int)((meep::structure_chunk const *)arg1)->is_mine();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_remove_susceptibilities(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_remove_susceptibilities", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_remove_susceptibilities" "', argument " "1"" of type '" "meep::structure_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  {
    try {
      (arg1)->remove_susceptibilities();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_get_chi1inv_at_pt__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  int arg4 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_get_chi1inv_at_pt", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_get_chi1inv_at_pt" "', argument " "1"" of type '" "meep::structure_chunk const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_chunk_get_chi1inv_at_pt" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "structure_chunk_get_chi1inv_at_pt" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "structure_chunk_get_chi1inv_at_pt" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      result = ((meep::structure_chunk const *)arg1)->get_chi1inv_at_pt(arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_get_chi1inv_at_pt__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  int arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_get_chi1inv_at_pt", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_get_chi1inv_at_pt" "', argument " "1"" of type '" "meep::structure_chunk const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_chunk_get_chi1inv_at_pt" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "structure_chunk_get_chi1inv_at_pt" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    try {
      result = ((meep::structure_chunk const *)arg1)->get_chi1inv_at_pt(arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_get_chi1inv_at_pt(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_structure_chunk_get_chi1inv_at_pt__SWIG_1(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_structure_chunk_get_chi1inv_at_pt__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'structure_chunk_get_chi1inv_at_pt'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::structure_chunk::get_chi1inv_at_pt(meep::component,meep::direction,int,double) const\n"
    "    meep::structure_chunk::get_chi1inv_at_pt(meep::component,meep::direction,int) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_structure_chunk_get_chi1inv__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  meep::ivec *arg4 = 0 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_get_chi1inv", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_get_chi1inv" "', argument " "1"" of type '" "meep::structure_chunk const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_chunk_get_chi1inv" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "structure_chunk_get_chi1inv" "', argument " "4"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_chunk_get_chi1inv" "', argument " "4"" of type '" "meep::ivec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::ivec * >(argp4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "structure_chunk_get_chi1inv" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      result = ((meep::structure_chunk const *)arg1)->get_chi1inv(arg2,arg3,(meep::ivec const &)*arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_get_chi1inv__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  meep::ivec *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_get_chi1inv", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_get_chi1inv" "', argument " "1"" of type '" "meep::structure_chunk const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_chunk_get_chi1inv" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "structure_chunk_get_chi1inv" "', argument " "4"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_chunk_get_chi1inv" "', argument " "4"" of type '" "meep::ivec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::ivec * >(argp4);
  {
    try {
      result = ((meep::structure_chunk const *)arg1)->get_chi1inv(arg2,arg3,(meep::ivec const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_get_chi1inv(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_structure_chunk_get_chi1inv__SWIG_1(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_structure_chunk_get_chi1inv__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'structure_chunk_get_chi1inv'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::structure_chunk::get_chi1inv(meep::component,meep::direction,meep::ivec const &,double) const\n"
    "    meep::structure_chunk::get_chi1inv(meep::component,meep::direction,meep::ivec const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_structure_chunk_get_inveps__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  meep::ivec *arg4 = 0 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_get_inveps", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_get_inveps" "', argument " "1"" of type '" "meep::structure_chunk const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_chunk_get_inveps" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "structure_chunk_get_inveps" "', argument " "4"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_chunk_get_inveps" "', argument " "4"" of type '" "meep::ivec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::ivec * >(argp4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "structure_chunk_get_inveps" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      result = ((meep::structure_chunk const *)arg1)->get_inveps(arg2,arg3,(meep::ivec const &)*arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_get_inveps__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  meep::ivec *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_get_inveps", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_get_inveps" "', argument " "1"" of type '" "meep::structure_chunk const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_chunk_get_inveps" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "structure_chunk_get_inveps" "', argument " "4"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_chunk_get_inveps" "', argument " "4"" of type '" "meep::ivec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::ivec * >(argp4);
  {
    try {
      result = ((meep::structure_chunk const *)arg1)->get_inveps(arg2,arg3,(meep::ivec const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunk_get_inveps(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_structure_chunk_get_inveps__SWIG_1(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_structure_chunk_get_inveps__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'structure_chunk_get_inveps'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::structure_chunk::get_inveps(meep::component,meep::direction,meep::ivec const &,double) const\n"
    "    meep::structure_chunk::get_inveps(meep::component,meep::direction,meep::ivec const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_structure_chunk_max_eps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure_chunk *arg1 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "structure_chunk_max_eps", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunk_max_eps" "', argument " "1"" of type '" "meep::structure_chunk const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure_chunk * >(argp1);
  {
    try {
      result = (double)((meep::structure_chunk const *)arg1)->max_eps();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *structure_chunk_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__structure_chunk, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *structure_chunk_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_boundary_region__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::boundary_region *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_boundary_region", 0, 0)) SWIG_fail;
  {
    try {
      result = (meep::boundary_region *)new meep::boundary_region();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_boundary_region__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::boundary_region::boundary_region_kind arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  meep::pml_profile_func arg5 = (meep::pml_profile_func) 0 ;
  void *arg6 = (void *) 0 ;
  double arg7 ;
  double arg8 ;
  meep::direction arg9 ;
  meep::boundary_side arg10 ;
  meep::boundary_region *arg11 = (meep::boundary_region *) 0 ;
  int val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  int val10 ;
  int ecode10 = 0 ;
  void *argp11 = 0 ;
  int res11 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  meep::boundary_region *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_boundary_region", 11, 11, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_boundary_region" "', argument " "1"" of type '" "meep::boundary_region::boundary_region_kind""'");
  } 
  arg1 = static_cast< meep::boundary_region::boundary_region_kind >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_boundary_region" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_boundary_region" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_boundary_region" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  {
    int res = SWIG_ConvertFunctionPtr(obj4, (void**)(&arg5), SWIGTYPE_p_f_double_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "new_boundary_region" "', argument " "5"" of type '" "meep::pml_profile_func""'"); 
    }
  }
  {
    arg6 = (void*)obj5;
  }
  ecode7 = SWIG_AsVal_double(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_boundary_region" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  ecode8 = SWIG_AsVal_double(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_boundary_region" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  ecode9 = SWIG_AsVal_int(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_boundary_region" "', argument " "9"" of type '" "meep::direction""'");
  } 
  arg9 = static_cast< meep::direction >(val9);
  ecode10 = SWIG_AsVal_int(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_boundary_region" "', argument " "10"" of type '" "meep::boundary_side""'");
  } 
  arg10 = static_cast< meep::boundary_side >(val10);
  res11 = SWIG_ConvertPtr(obj10, &argp11,SWIGTYPE_p_meep__boundary_region, 0 |  0 );
  if (!SWIG_IsOK(res11)) {
    SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_boundary_region" "', argument " "11"" of type '" "meep::boundary_region *""'"); 
  }
  arg11 = reinterpret_cast< meep::boundary_region * >(argp11);
  {
    try {
      result = (meep::boundary_region *)new meep::boundary_region(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_boundary_region__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::boundary_region::boundary_region_kind arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  meep::pml_profile_func arg5 = (meep::pml_profile_func) 0 ;
  void *arg6 = (void *) 0 ;
  double arg7 ;
  double arg8 ;
  meep::direction arg9 ;
  meep::boundary_side arg10 ;
  int val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  int val10 ;
  int ecode10 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  meep::boundary_region *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_boundary_region", 10, 10, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_boundary_region" "', argument " "1"" of type '" "meep::boundary_region::boundary_region_kind""'");
  } 
  arg1 = static_cast< meep::boundary_region::boundary_region_kind >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_boundary_region" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_boundary_region" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_boundary_region" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  {
    int res = SWIG_ConvertFunctionPtr(obj4, (void**)(&arg5), SWIGTYPE_p_f_double_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "new_boundary_region" "', argument " "5"" of type '" "meep::pml_profile_func""'"); 
    }
  }
  {
    arg6 = (void*)obj5;
  }
  ecode7 = SWIG_AsVal_double(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_boundary_region" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  ecode8 = SWIG_AsVal_double(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_boundary_region" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  ecode9 = SWIG_AsVal_int(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_boundary_region" "', argument " "9"" of type '" "meep::direction""'");
  } 
  arg9 = static_cast< meep::direction >(val9);
  ecode10 = SWIG_AsVal_int(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_boundary_region" "', argument " "10"" of type '" "meep::boundary_side""'");
  } 
  arg10 = static_cast< meep::boundary_side >(val10);
  {
    try {
      result = (meep::boundary_region *)new meep::boundary_region(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_boundary_region__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::boundary_region *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::boundary_region *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_boundary_region", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__boundary_region,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_boundary_region" "', argument " "1"" of type '" "meep::boundary_region const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_boundary_region" "', argument " "1"" of type '" "meep::boundary_region const &""'"); 
  }
  arg1 = reinterpret_cast< meep::boundary_region * >(argp1);
  {
    try {
      result = (meep::boundary_region *)new meep::boundary_region((meep::boundary_region const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_boundary_region(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[12] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 11) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_boundary_region__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_boundary_region__SWIG_3(self, args);
    }
  }
  if (argc == 10) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertFunctionPtr(argv[4], &ptr, SWIGTYPE_p_f_double_p_void__double);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                _v = PyCallable_Check(argv[5]);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_double(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_double(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    {
                      int res = SWIG_AsVal_int(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        int res = SWIG_AsVal_int(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        return _wrap_new_boundary_region__SWIG_2(self, args);
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 11) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertFunctionPtr(argv[4], &ptr, SWIGTYPE_p_f_double_p_void__double);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                _v = PyCallable_Check(argv[5]);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_double(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_double(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    {
                      int res = SWIG_AsVal_int(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        int res = SWIG_AsVal_int(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        void *vptr = 0;
                        int res = SWIG_ConvertPtr(argv[10], &vptr, SWIGTYPE_p_meep__boundary_region, 0);
                        _v = SWIG_CheckState(res);
                        if (_v) {
                          return _wrap_new_boundary_region__SWIG_1(self, args);
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_boundary_region'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::boundary_region::boundary_region()\n"
    "    meep::boundary_region::boundary_region(meep::boundary_region::boundary_region_kind,double,double,double,meep::pml_profile_func,void *,double,double,meep::direction,meep::boundary_side,meep::boundary_region *)\n"
    "    meep::boundary_region::boundary_region(meep::boundary_region::boundary_region_kind,double,double,double,meep::pml_profile_func,void *,double,double,meep::direction,meep::boundary_side)\n"
    "    meep::boundary_region::boundary_region(meep::boundary_region const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_boundary_region(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::boundary_region *arg1 = (meep::boundary_region *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_boundary_region", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_boundary_region" "', argument " "1"" of type '" "meep::boundary_region *""'"); 
  }
  arg1 = reinterpret_cast< meep::boundary_region * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_boundary_region_boundary_region_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::boundary_region *arg1 = (meep::boundary_region *) 0 ;
  meep::boundary_region *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "boundary_region_boundary_region_assign", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__boundary_region, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "boundary_region_boundary_region_assign" "', argument " "1"" of type '" "meep::boundary_region *""'"); 
  }
  arg1 = reinterpret_cast< meep::boundary_region * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__boundary_region,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "boundary_region_boundary_region_assign" "', argument " "2"" of type '" "meep::boundary_region const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "boundary_region_boundary_region_assign" "', argument " "2"" of type '" "meep::boundary_region const &""'"); 
  }
  arg2 = reinterpret_cast< meep::boundary_region * >(argp2);
  {
    try {
      (arg1)->operator =((meep::boundary_region const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_boundary_region___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::boundary_region *arg1 = (meep::boundary_region *) 0 ;
  meep::boundary_region *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::boundary_region result;
  
  if (!PyArg_UnpackTuple(args, "boundary_region___add__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__boundary_region, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "boundary_region___add__" "', argument " "1"" of type '" "meep::boundary_region const *""'"); 
  }
  arg1 = reinterpret_cast< meep::boundary_region * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__boundary_region,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "boundary_region___add__" "', argument " "2"" of type '" "meep::boundary_region const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "boundary_region___add__" "', argument " "2"" of type '" "meep::boundary_region const &""'"); 
  }
  arg2 = reinterpret_cast< meep::boundary_region * >(argp2);
  {
    try {
      result = ((meep::boundary_region const *)arg1)->operator +((meep::boundary_region const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::boundary_region(static_cast< const meep::boundary_region& >(result))), SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_boundary_region___mul__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::boundary_region *arg1 = (meep::boundary_region *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::boundary_region result;
  
  if (!PyArg_UnpackTuple(args, "boundary_region___mul__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__boundary_region, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "boundary_region___mul__" "', argument " "1"" of type '" "meep::boundary_region const *""'"); 
  }
  arg1 = reinterpret_cast< meep::boundary_region * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "boundary_region___mul__" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = ((meep::boundary_region const *)arg1)->operator *(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::boundary_region(static_cast< const meep::boundary_region& >(result))), SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_boundary_region_br_apply__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::boundary_region *arg1 = (meep::boundary_region *) 0 ;
  meep::structure *arg2 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "boundary_region_br_apply", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__boundary_region, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "boundary_region_br_apply" "', argument " "1"" of type '" "meep::boundary_region const *""'"); 
  }
  arg1 = reinterpret_cast< meep::boundary_region * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "boundary_region_br_apply" "', argument " "2"" of type '" "meep::structure *""'"); 
  }
  arg2 = reinterpret_cast< meep::structure * >(argp2);
  {
    try {
      ((meep::boundary_region const *)arg1)->apply(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_boundary_region_br_apply__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::boundary_region *arg1 = (meep::boundary_region *) 0 ;
  meep::structure *arg2 = (meep::structure *) 0 ;
  meep::structure_chunk *arg3 = (meep::structure_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "boundary_region_br_apply", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__boundary_region, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "boundary_region_br_apply" "', argument " "1"" of type '" "meep::boundary_region const *""'"); 
  }
  arg1 = reinterpret_cast< meep::boundary_region * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "boundary_region_br_apply" "', argument " "2"" of type '" "meep::structure const *""'"); 
  }
  arg2 = reinterpret_cast< meep::structure * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "boundary_region_br_apply" "', argument " "3"" of type '" "meep::structure_chunk *""'"); 
  }
  arg3 = reinterpret_cast< meep::structure_chunk * >(argp3);
  {
    try {
      ((meep::boundary_region const *)arg1)->apply((meep::structure const *)arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_boundary_region_br_apply(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__boundary_region, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__structure, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_boundary_region_br_apply__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__boundary_region, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__structure, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__structure_chunk, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_boundary_region_br_apply__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'boundary_region_br_apply'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::boundary_region::apply(meep::structure *) const\n"
    "    meep::boundary_region::apply(meep::structure const *,meep::structure_chunk *) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_boundary_region_check_ok(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::boundary_region *arg1 = (meep::boundary_region *) 0 ;
  meep::grid_volume *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "boundary_region_check_ok", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__boundary_region, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "boundary_region_check_ok" "', argument " "1"" of type '" "meep::boundary_region const *""'"); 
  }
  arg1 = reinterpret_cast< meep::boundary_region * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "boundary_region_check_ok" "', argument " "2"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "boundary_region_check_ok" "', argument " "2"" of type '" "meep::grid_volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::grid_volume * >(argp2);
  {
    try {
      result = (bool)((meep::boundary_region const *)arg1)->check_ok((meep::grid_volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *boundary_region_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__boundary_region, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *boundary_region_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_pml__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  meep::direction arg2 ;
  meep::boundary_side arg3 ;
  double arg4 ;
  double arg5 ;
  double val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  meep::boundary_region result;
  
  if (!PyArg_UnpackTuple(args, "pml", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pml" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pml" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pml" "', argument " "3"" of type '" "meep::boundary_side""'");
  } 
  arg3 = static_cast< meep::boundary_side >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "pml" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "pml" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      result = meep::pml(arg1,arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::boundary_region(static_cast< const meep::boundary_region& >(result))), SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pml__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  meep::direction arg2 ;
  meep::boundary_side arg3 ;
  double arg4 ;
  double val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::boundary_region result;
  
  if (!PyArg_UnpackTuple(args, "pml", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pml" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pml" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pml" "', argument " "3"" of type '" "meep::boundary_side""'");
  } 
  arg3 = static_cast< meep::boundary_side >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "pml" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  {
    try {
      result = meep::pml(arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::boundary_region(static_cast< const meep::boundary_region& >(result))), SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pml__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  meep::direction arg2 ;
  meep::boundary_side arg3 ;
  double val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::boundary_region result;
  
  if (!PyArg_UnpackTuple(args, "pml", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pml" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pml" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pml" "', argument " "3"" of type '" "meep::boundary_side""'");
  } 
  arg3 = static_cast< meep::boundary_side >(val3);
  {
    try {
      result = meep::pml(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::boundary_region(static_cast< const meep::boundary_region& >(result))), SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pml__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  meep::direction arg2 ;
  double arg3 ;
  double arg4 ;
  double val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::boundary_region result;
  
  if (!PyArg_UnpackTuple(args, "pml", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pml" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pml" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pml" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "pml" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  {
    try {
      result = meep::pml(arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::boundary_region(static_cast< const meep::boundary_region& >(result))), SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pml__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  meep::direction arg2 ;
  double arg3 ;
  double val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::boundary_region result;
  
  if (!PyArg_UnpackTuple(args, "pml", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pml" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pml" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pml" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      result = meep::pml(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::boundary_region(static_cast< const meep::boundary_region& >(result))), SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pml__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  meep::direction arg2 ;
  double val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::boundary_region result;
  
  if (!PyArg_UnpackTuple(args, "pml", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pml" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pml" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  {
    try {
      result = meep::pml(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::boundary_region(static_cast< const meep::boundary_region& >(result))), SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pml__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::boundary_region result;
  
  if (!PyArg_UnpackTuple(args, "pml", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pml" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pml" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "pml" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      result = meep::pml(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::boundary_region(static_cast< const meep::boundary_region& >(result))), SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pml__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::boundary_region result;
  
  if (!PyArg_UnpackTuple(args, "pml", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pml" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pml" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = meep::pml(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::boundary_region(static_cast< const meep::boundary_region& >(result))), SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pml__SWIG_8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::boundary_region result;
  
  if (!PyArg_UnpackTuple(args, "pml", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pml" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  {
    try {
      result = meep::pml(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::boundary_region(static_cast< const meep::boundary_region& >(result))), SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pml(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_pml__SWIG_8(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_pml__SWIG_5(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_pml__SWIG_7(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_pml__SWIG_2(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_pml__SWIG_4(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_pml__SWIG_6(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_pml__SWIG_1(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_pml__SWIG_3(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_pml__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'pml'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::pml(double,meep::direction,meep::boundary_side,double,double)\n"
    "    meep::pml(double,meep::direction,meep::boundary_side,double)\n"
    "    meep::pml(double,meep::direction,meep::boundary_side)\n"
    "    meep::pml(double,meep::direction,double,double)\n"
    "    meep::pml(double,meep::direction,double)\n"
    "    meep::pml(double,meep::direction)\n"
    "    meep::pml(double,double,double)\n"
    "    meep::pml(double,double)\n"
    "    meep::pml(double)\n");
  return 0;
}


SWIGINTERN int Swig_var_NUM_CONNECT_PHASE_TYPES_set(PyObject *) {
  SWIG_Error(SWIG_AttributeError,"Variable NUM_CONNECT_PHASE_TYPES is read-only.");
  return 1;
}


SWIGINTERN PyObject *Swig_var_NUM_CONNECT_PHASE_TYPES_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_From_int(static_cast< int >(meep::NUM_CONNECT_PHASE_TYPES));
  return pyobj;
}


SWIGINTERN PyObject *_wrap___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::comms_key *arg1 = 0 ;
  meep::comms_key *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "__eq__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__comms_key,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__eq__" "', argument " "1"" of type '" "meep::comms_key const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__eq__" "', argument " "1"" of type '" "meep::comms_key const &""'"); 
  }
  arg1 = reinterpret_cast< meep::comms_key * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__comms_key,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "__eq__" "', argument " "2"" of type '" "meep::comms_key const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__eq__" "', argument " "2"" of type '" "meep::comms_key const &""'"); 
  }
  arg2 = reinterpret_cast< meep::comms_key * >(argp2);
  {
    try {
      result = (bool)meep::operator ==((meep::comms_key const &)*arg1,(meep::comms_key const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  PyErr_Clear();
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *_wrap_structure_chunks_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::structure_chunk **arg2 = (meep::structure_chunk **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunks_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunks_set" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_meep__structure_chunk, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_chunks_set" "', argument " "2"" of type '" "meep::structure_chunk **""'"); 
  }
  arg2 = reinterpret_cast< meep::structure_chunk ** >(argp2);
  if (arg1) (arg1)->chunks = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_chunks_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::structure_chunk **result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_chunks_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_chunks_get" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  result = (meep::structure_chunk **) ((arg1)->chunks);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_meep__structure_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_num_chunks_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_num_chunks_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_num_chunks_set" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "structure_num_chunks_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  if (arg1) (arg1)->num_chunks = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_num_chunks_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "structure_num_chunks_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_num_chunks_get" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  result = (int) ((arg1)->num_chunks);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_shared_chunks_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_shared_chunks_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_shared_chunks_set" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  ecode2 = SWIG_AsVal_bool(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "structure_shared_chunks_set" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  if (arg1) (arg1)->shared_chunks = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_shared_chunks_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "structure_shared_chunks_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_shared_chunks_get" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  result = (bool) ((arg1)->shared_chunks);
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_gv_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::grid_volume *arg2 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_gv_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_gv_set" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_gv_set" "', argument " "2"" of type '" "meep::grid_volume *""'"); 
  }
  arg2 = reinterpret_cast< meep::grid_volume * >(argp2);
  if (arg1) (arg1)->gv = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_gv_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::grid_volume *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_gv_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_gv_get" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  result = (meep::grid_volume *)& ((arg1)->gv);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_user_volume_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::grid_volume *arg2 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_user_volume_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_user_volume_set" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_user_volume_set" "', argument " "2"" of type '" "meep::grid_volume *""'"); 
  }
  arg2 = reinterpret_cast< meep::grid_volume * >(argp2);
  if (arg1) (arg1)->user_volume = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_user_volume_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::grid_volume *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_user_volume_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_user_volume_get" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  result = (meep::grid_volume *)& ((arg1)->user_volume);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_a_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_a_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_a_set" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "structure_a_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->a = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_a_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "structure_a_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_a_get" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  result = (double) ((arg1)->a);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_Courant_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_Courant_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_Courant_set" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "structure_Courant_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->Courant = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_Courant_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "structure_Courant_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_Courant_get" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  result = (double) ((arg1)->Courant);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_dt_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_dt_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_dt_set" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "structure_dt_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->dt = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_dt_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "structure_dt_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_dt_get" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  result = (double) ((arg1)->dt);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_v_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::volume *arg2 = (meep::volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_v_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_v_set" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_v_set" "', argument " "2"" of type '" "meep::volume *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  if (arg1) (arg1)->v = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_v_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::volume *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_v_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_v_get" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  result = (meep::volume *)& ((arg1)->v);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__volume, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_S_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::symmetry *arg2 = (meep::symmetry *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_S_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_S_set" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_S_set" "', argument " "2"" of type '" "meep::symmetry *""'"); 
  }
  arg2 = reinterpret_cast< meep::symmetry * >(argp2);
  if (arg1) (arg1)->S = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_S_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::symmetry *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_S_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_S_get" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  result = (meep::symmetry *)& ((arg1)->S);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__symmetry, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_outdir_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_outdir_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_outdir_set" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_outdir_set" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (arg2) {
    size_t size = strlen(reinterpret_cast< const char * >(reinterpret_cast< const char * >(arg2))) + 1;
    arg1->outdir = (char const *)reinterpret_cast< char* >(memcpy(new char[size], arg2, sizeof(char)*(size)));
  } else {
    arg1->outdir = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_outdir_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_outdir_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_outdir_get" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  result = (char *) ((arg1)->outdir);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_effort_volumes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::grid_volume *arg2 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_effort_volumes_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_effort_volumes_set" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_effort_volumes_set" "', argument " "2"" of type '" "meep::grid_volume *""'"); 
  }
  arg2 = reinterpret_cast< meep::grid_volume * >(argp2);
  if (arg1) (arg1)->effort_volumes = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_effort_volumes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::grid_volume *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_effort_volumes_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_effort_volumes_get" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  result = (meep::grid_volume *) ((arg1)->effort_volumes);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_effort_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  double *arg2 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_effort_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_effort_set" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_effort_set" "', argument " "2"" of type '" "double *""'"); 
  }
  arg2 = reinterpret_cast< double * >(argp2);
  if (arg1) (arg1)->effort = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_effort_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_effort_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_effort_get" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  result = (double *) ((arg1)->effort);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_num_effort_volumes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_num_effort_volumes_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_num_effort_volumes_set" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "structure_num_effort_volumes_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  if (arg1) (arg1)->num_effort_volumes = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_num_effort_volumes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "structure_num_effort_volumes_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_num_effort_volumes_get" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  result = (int) ((arg1)->num_effort_volumes);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_structure(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_structure", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_structure" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_structure__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = 0 ;
  meep::material_function *arg2 = 0 ;
  meep::boundary_region *arg3 = 0 ;
  meep::symmetry *arg4 = 0 ;
  int arg5 ;
  double arg6 ;
  bool arg7 ;
  double arg8 ;
  int arg9 ;
  meep::binary_partition *arg10 = (meep::binary_partition *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  std::unique_ptr< meep::binary_partition > temp10 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  meep::structure *result = 0 ;
  
  {
    arg10 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "new_structure", 10, 10, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_structure" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  arg2 = reinterpret_cast< meep::material_function * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__boundary_region,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  arg3 = reinterpret_cast< meep::boundary_region * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__symmetry,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  arg4 = reinterpret_cast< meep::symmetry * >(argp4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_structure" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_structure" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_structure" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  ecode8 = SWIG_AsVal_double(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_structure" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  ecode9 = SWIG_AsVal_int(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_structure" "', argument " "9"" of type '" "int""'");
  } 
  arg9 = static_cast< int >(val9);
  {
    temp10 = py_bp_to_bp(obj9);
    arg10 = temp10.get();
  }
  {
    try {
      result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,*arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5,arg6,arg7,arg8,arg9,(meep::binary_partition const *)arg10);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__structure, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_structure__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = 0 ;
  meep::material_function *arg2 = 0 ;
  meep::boundary_region *arg3 = 0 ;
  meep::symmetry *arg4 = 0 ;
  int arg5 ;
  double arg6 ;
  bool arg7 ;
  double arg8 ;
  int arg9 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  meep::structure *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_structure", 9, 9, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_structure" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  arg2 = reinterpret_cast< meep::material_function * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__boundary_region,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  arg3 = reinterpret_cast< meep::boundary_region * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__symmetry,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  arg4 = reinterpret_cast< meep::symmetry * >(argp4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_structure" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_structure" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_structure" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  ecode8 = SWIG_AsVal_double(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_structure" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  ecode9 = SWIG_AsVal_int(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_structure" "', argument " "9"" of type '" "int""'");
  } 
  arg9 = static_cast< int >(val9);
  {
    try {
      result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,*arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5,arg6,arg7,arg8,arg9);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__structure, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_structure__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = 0 ;
  meep::material_function *arg2 = 0 ;
  meep::boundary_region *arg3 = 0 ;
  meep::symmetry *arg4 = 0 ;
  int arg5 ;
  double arg6 ;
  bool arg7 ;
  double arg8 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  meep::structure *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_structure", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_structure" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  arg2 = reinterpret_cast< meep::material_function * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__boundary_region,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  arg3 = reinterpret_cast< meep::boundary_region * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__symmetry,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  arg4 = reinterpret_cast< meep::symmetry * >(argp4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_structure" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_structure" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_structure" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  ecode8 = SWIG_AsVal_double(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_structure" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  {
    try {
      result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,*arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5,arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__structure, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_structure__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = 0 ;
  meep::material_function *arg2 = 0 ;
  meep::boundary_region *arg3 = 0 ;
  meep::symmetry *arg4 = 0 ;
  int arg5 ;
  double arg6 ;
  bool arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  meep::structure *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_structure", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_structure" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  arg2 = reinterpret_cast< meep::material_function * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__boundary_region,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  arg3 = reinterpret_cast< meep::boundary_region * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__symmetry,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  arg4 = reinterpret_cast< meep::symmetry * >(argp4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_structure" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_structure" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_structure" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  {
    try {
      result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,*arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__structure, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_structure__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = 0 ;
  meep::material_function *arg2 = 0 ;
  meep::boundary_region *arg3 = 0 ;
  meep::symmetry *arg4 = 0 ;
  int arg5 ;
  double arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  meep::structure *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_structure", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_structure" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  arg2 = reinterpret_cast< meep::material_function * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__boundary_region,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  arg3 = reinterpret_cast< meep::boundary_region * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__symmetry,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  arg4 = reinterpret_cast< meep::symmetry * >(argp4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_structure" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_structure" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  {
    try {
      result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,*arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__structure, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_structure__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = 0 ;
  meep::material_function *arg2 = 0 ;
  meep::boundary_region *arg3 = 0 ;
  meep::symmetry *arg4 = 0 ;
  int arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  meep::structure *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_structure", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_structure" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  arg2 = reinterpret_cast< meep::material_function * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__boundary_region,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  arg3 = reinterpret_cast< meep::boundary_region * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__symmetry,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  arg4 = reinterpret_cast< meep::symmetry * >(argp4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_structure" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    try {
      result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,*arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__structure, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_structure__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = 0 ;
  meep::material_function *arg2 = 0 ;
  meep::boundary_region *arg3 = 0 ;
  meep::symmetry *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::structure *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_structure", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_structure" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  arg2 = reinterpret_cast< meep::material_function * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__boundary_region,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  arg3 = reinterpret_cast< meep::boundary_region * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__symmetry,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  arg4 = reinterpret_cast< meep::symmetry * >(argp4);
  {
    try {
      result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,*arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__structure, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_structure__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = 0 ;
  meep::material_function *arg2 = 0 ;
  meep::boundary_region *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::structure *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_structure", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_structure" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  arg2 = reinterpret_cast< meep::material_function * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__boundary_region,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  arg3 = reinterpret_cast< meep::boundary_region * >(argp3);
  {
    try {
      result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,*arg2,(meep::boundary_region const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__structure, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_structure__SWIG_8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = 0 ;
  meep::material_function *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::structure *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_structure", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_structure" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  arg2 = reinterpret_cast< meep::material_function * >(argp2);
  {
    try {
      result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__structure, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_structure__SWIG_9(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = 0 ;
  double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ;
  meep::boundary_region *arg3 = 0 ;
  meep::symmetry *arg4 = 0 ;
  int arg5 ;
  double arg6 ;
  bool arg7 ;
  double arg8 ;
  int arg9 ;
  meep::binary_partition *arg10 = (meep::binary_partition *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  std::unique_ptr< meep::binary_partition > temp10 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  meep::structure *result = 0 ;
  
  {
    arg10 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "new_structure", 10, 10, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    if (obj1 == Py_None) {
      arg2 = NULL;
      py_callback = NULL;
    } else {
      arg2 = py_callback_wrap;
      py_callback = obj1;
      Py_INCREF(py_callback);
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__boundary_region,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  arg3 = reinterpret_cast< meep::boundary_region * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__symmetry,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  arg4 = reinterpret_cast< meep::symmetry * >(argp4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_structure" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_structure" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_structure" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  ecode8 = SWIG_AsVal_double(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_structure" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  ecode9 = SWIG_AsVal_int(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_structure" "', argument " "9"" of type '" "int""'");
  } 
  arg9 = static_cast< int >(val9);
  {
    temp10 = py_bp_to_bp(obj9);
    arg10 = temp10.get();
  }
  {
    try {
      result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5,arg6,arg7,arg8,arg9,(meep::binary_partition const *)arg10);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__structure, SWIG_POINTER_NEW |  0 );
  {
    Py_XDECREF(py_callback);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_callback);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_structure__SWIG_10(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = 0 ;
  double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ;
  meep::boundary_region *arg3 = 0 ;
  meep::symmetry *arg4 = 0 ;
  int arg5 ;
  double arg6 ;
  bool arg7 ;
  double arg8 ;
  int arg9 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  meep::structure *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_structure", 9, 9, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    if (obj1 == Py_None) {
      arg2 = NULL;
      py_callback = NULL;
    } else {
      arg2 = py_callback_wrap;
      py_callback = obj1;
      Py_INCREF(py_callback);
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__boundary_region,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  arg3 = reinterpret_cast< meep::boundary_region * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__symmetry,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  arg4 = reinterpret_cast< meep::symmetry * >(argp4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_structure" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_structure" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_structure" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  ecode8 = SWIG_AsVal_double(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_structure" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  ecode9 = SWIG_AsVal_int(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_structure" "', argument " "9"" of type '" "int""'");
  } 
  arg9 = static_cast< int >(val9);
  {
    try {
      result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5,arg6,arg7,arg8,arg9);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__structure, SWIG_POINTER_NEW |  0 );
  {
    Py_XDECREF(py_callback);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_callback);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_structure__SWIG_11(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = 0 ;
  double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ;
  meep::boundary_region *arg3 = 0 ;
  meep::symmetry *arg4 = 0 ;
  int arg5 ;
  double arg6 ;
  bool arg7 ;
  double arg8 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  meep::structure *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_structure", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    if (obj1 == Py_None) {
      arg2 = NULL;
      py_callback = NULL;
    } else {
      arg2 = py_callback_wrap;
      py_callback = obj1;
      Py_INCREF(py_callback);
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__boundary_region,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  arg3 = reinterpret_cast< meep::boundary_region * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__symmetry,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  arg4 = reinterpret_cast< meep::symmetry * >(argp4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_structure" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_structure" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_structure" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  ecode8 = SWIG_AsVal_double(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_structure" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  {
    try {
      result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5,arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__structure, SWIG_POINTER_NEW |  0 );
  {
    Py_XDECREF(py_callback);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_callback);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_structure__SWIG_12(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = 0 ;
  double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ;
  meep::boundary_region *arg3 = 0 ;
  meep::symmetry *arg4 = 0 ;
  int arg5 ;
  double arg6 ;
  bool arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  meep::structure *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_structure", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    if (obj1 == Py_None) {
      arg2 = NULL;
      py_callback = NULL;
    } else {
      arg2 = py_callback_wrap;
      py_callback = obj1;
      Py_INCREF(py_callback);
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__boundary_region,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  arg3 = reinterpret_cast< meep::boundary_region * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__symmetry,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  arg4 = reinterpret_cast< meep::symmetry * >(argp4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_structure" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_structure" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_structure" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  {
    try {
      result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__structure, SWIG_POINTER_NEW |  0 );
  {
    Py_XDECREF(py_callback);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_callback);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_structure__SWIG_13(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = 0 ;
  double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ;
  meep::boundary_region *arg3 = 0 ;
  meep::symmetry *arg4 = 0 ;
  int arg5 ;
  double arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  meep::structure *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_structure", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    if (obj1 == Py_None) {
      arg2 = NULL;
      py_callback = NULL;
    } else {
      arg2 = py_callback_wrap;
      py_callback = obj1;
      Py_INCREF(py_callback);
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__boundary_region,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  arg3 = reinterpret_cast< meep::boundary_region * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__symmetry,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  arg4 = reinterpret_cast< meep::symmetry * >(argp4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_structure" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_structure" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  {
    try {
      result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__structure, SWIG_POINTER_NEW |  0 );
  {
    Py_XDECREF(py_callback);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_callback);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_structure__SWIG_14(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = 0 ;
  double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ;
  meep::boundary_region *arg3 = 0 ;
  meep::symmetry *arg4 = 0 ;
  int arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  meep::structure *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_structure", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    if (obj1 == Py_None) {
      arg2 = NULL;
      py_callback = NULL;
    } else {
      arg2 = py_callback_wrap;
      py_callback = obj1;
      Py_INCREF(py_callback);
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__boundary_region,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  arg3 = reinterpret_cast< meep::boundary_region * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__symmetry,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  arg4 = reinterpret_cast< meep::symmetry * >(argp4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_structure" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    try {
      result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__structure, SWIG_POINTER_NEW |  0 );
  {
    Py_XDECREF(py_callback);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_callback);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_structure__SWIG_15(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = 0 ;
  double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ;
  meep::boundary_region *arg3 = 0 ;
  meep::symmetry *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::structure *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_structure", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    if (obj1 == Py_None) {
      arg2 = NULL;
      py_callback = NULL;
    } else {
      arg2 = py_callback_wrap;
      py_callback = obj1;
      Py_INCREF(py_callback);
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__boundary_region,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  arg3 = reinterpret_cast< meep::boundary_region * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__symmetry,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  arg4 = reinterpret_cast< meep::symmetry * >(argp4);
  {
    try {
      result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,arg2,(meep::boundary_region const &)*arg3,(meep::symmetry const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__structure, SWIG_POINTER_NEW |  0 );
  {
    Py_XDECREF(py_callback);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_callback);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_structure__SWIG_16(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = 0 ;
  double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ;
  meep::boundary_region *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::structure *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_structure", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    if (obj1 == Py_None) {
      arg2 = NULL;
      py_callback = NULL;
    } else {
      arg2 = py_callback_wrap;
      py_callback = obj1;
      Py_INCREF(py_callback);
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__boundary_region,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "3"" of type '" "meep::boundary_region const &""'"); 
  }
  arg3 = reinterpret_cast< meep::boundary_region * >(argp3);
  {
    try {
      result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,arg2,(meep::boundary_region const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__structure, SWIG_POINTER_NEW |  0 );
  {
    Py_XDECREF(py_callback);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_callback);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_structure__SWIG_17(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume *arg1 = 0 ;
  double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::structure *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_structure", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "1"" of type '" "meep::grid_volume const &""'"); 
  }
  arg1 = reinterpret_cast< meep::grid_volume * >(argp1);
  {
    if (obj1 == Py_None) {
      arg2 = NULL;
      py_callback = NULL;
    } else {
      arg2 = py_callback_wrap;
      py_callback = obj1;
      Py_INCREF(py_callback);
    }
  }
  {
    try {
      result = (meep::structure *)new meep::structure((meep::grid_volume const &)*arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__structure, SWIG_POINTER_NEW |  0 );
  {
    Py_XDECREF(py_callback);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_callback);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_structure__SWIG_18(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::structure *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_structure", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__structure,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_structure" "', argument " "1"" of type '" "meep::structure const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_structure" "', argument " "1"" of type '" "meep::structure const &""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    try {
      result = (meep::structure *)new meep::structure((meep::structure const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__structure, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_structure(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[11] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 10) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__structure, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_structure__SWIG_18(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyCallable_Check(argv[1]) || argv[1] == Py_None;
      }
      if (_v) {
        return _wrap_new_structure__SWIG_17(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_new_structure__SWIG_8(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_new_structure__SWIG_7(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyCallable_Check(argv[1]) || argv[1] == Py_None;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_new_structure__SWIG_16(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyCallable_Check(argv[1]) || argv[1] == Py_None;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__symmetry, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_new_structure__SWIG_15(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__symmetry, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_new_structure__SWIG_6(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__symmetry, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_new_structure__SWIG_5(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyCallable_Check(argv[1]) || argv[1] == Py_None;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__symmetry, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_new_structure__SWIG_14(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyCallable_Check(argv[1]) || argv[1] == Py_None;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__symmetry, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_new_structure__SWIG_13(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__symmetry, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_new_structure__SWIG_4(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__symmetry, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_new_structure__SWIG_3(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyCallable_Check(argv[1]) || argv[1] == Py_None;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__symmetry, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_new_structure__SWIG_12(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyCallable_Check(argv[1]) || argv[1] == Py_None;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__symmetry, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_double(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    return _wrap_new_structure__SWIG_11(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__symmetry, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_double(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    return _wrap_new_structure__SWIG_2(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 9) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__symmetry, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_double(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    {
                      int res = SWIG_AsVal_int(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      return _wrap_new_structure__SWIG_1(self, args);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 9) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyCallable_Check(argv[1]) || argv[1] == Py_None;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__symmetry, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_double(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    {
                      int res = SWIG_AsVal_int(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      return _wrap_new_structure__SWIG_10(self, args);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 10) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyCallable_Check(argv[1]) || argv[1] == Py_None;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__symmetry, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_double(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    {
                      int res = SWIG_AsVal_int(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        _v = PyObject_IsInstance(argv[9], py_binary_partition_object());
                      }
                      if (_v) {
                        return _wrap_new_structure__SWIG_9(self, args);
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 10) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__symmetry, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_double(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    {
                      int res = SWIG_AsVal_int(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        _v = PyObject_IsInstance(argv[9], py_binary_partition_object());
                      }
                      if (_v) {
                        return _wrap_new_structure__SWIG_0(self, args);
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_structure'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::structure::structure(meep::grid_volume const &,meep::material_function &,meep::boundary_region const &,meep::symmetry const &,int,double,bool,double,int,meep::binary_partition const *)\n"
    "    meep::structure::structure(meep::grid_volume const &,meep::material_function &,meep::boundary_region const &,meep::symmetry const &,int,double,bool,double,int)\n"
    "    meep::structure::structure(meep::grid_volume const &,meep::material_function &,meep::boundary_region const &,meep::symmetry const &,int,double,bool,double)\n"
    "    meep::structure::structure(meep::grid_volume const &,meep::material_function &,meep::boundary_region const &,meep::symmetry const &,int,double,bool)\n"
    "    meep::structure::structure(meep::grid_volume const &,meep::material_function &,meep::boundary_region const &,meep::symmetry const &,int,double)\n"
    "    meep::structure::structure(meep::grid_volume const &,meep::material_function &,meep::boundary_region const &,meep::symmetry const &,int)\n"
    "    meep::structure::structure(meep::grid_volume const &,meep::material_function &,meep::boundary_region const &,meep::symmetry const &)\n"
    "    meep::structure::structure(meep::grid_volume const &,meep::material_function &,meep::boundary_region const &)\n"
    "    meep::structure::structure(meep::grid_volume const &,meep::material_function &)\n"
    "    meep::structure::structure(meep::grid_volume const &,double (*)(meep::vec const &),meep::boundary_region const &,meep::symmetry const &,int,double,bool,double,int,meep::binary_partition const *)\n"
    "    meep::structure::structure(meep::grid_volume const &,double (*)(meep::vec const &),meep::boundary_region const &,meep::symmetry const &,int,double,bool,double,int)\n"
    "    meep::structure::structure(meep::grid_volume const &,double (*)(meep::vec const &),meep::boundary_region const &,meep::symmetry const &,int,double,bool,double)\n"
    "    meep::structure::structure(meep::grid_volume const &,double (*)(meep::vec const &),meep::boundary_region const &,meep::symmetry const &,int,double,bool)\n"
    "    meep::structure::structure(meep::grid_volume const &,double (*)(meep::vec const &),meep::boundary_region const &,meep::symmetry const &,int,double)\n"
    "    meep::structure::structure(meep::grid_volume const &,double (*)(meep::vec const &),meep::boundary_region const &,meep::symmetry const &,int)\n"
    "    meep::structure::structure(meep::grid_volume const &,double (*)(meep::vec const &),meep::boundary_region const &,meep::symmetry const &)\n"
    "    meep::structure::structure(meep::grid_volume const &,double (*)(meep::vec const &),meep::boundary_region const &)\n"
    "    meep::structure::structure(meep::grid_volume const &,double (*)(meep::vec const &))\n"
    "    meep::structure::structure(meep::structure const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_structure_set_materials__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::material_function *arg2 = 0 ;
  bool arg3 ;
  double arg4 ;
  int arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_materials", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_materials" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_set_materials" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_set_materials" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  arg2 = reinterpret_cast< meep::material_function * >(argp2);
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_set_materials" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "structure_set_materials" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "structure_set_materials" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    try {
      (arg1)->set_materials(*arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_materials__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::material_function *arg2 = 0 ;
  bool arg3 ;
  double arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_materials", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_materials" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_set_materials" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_set_materials" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  arg2 = reinterpret_cast< meep::material_function * >(argp2);
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_set_materials" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "structure_set_materials" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  {
    try {
      (arg1)->set_materials(*arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_materials__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::material_function *arg2 = 0 ;
  bool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_materials", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_materials" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_set_materials" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_set_materials" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  arg2 = reinterpret_cast< meep::material_function * >(argp2);
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_set_materials" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      (arg1)->set_materials(*arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_materials__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::material_function *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_materials", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_materials" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_set_materials" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_set_materials" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  arg2 = reinterpret_cast< meep::material_function * >(argp2);
  {
    try {
      (arg1)->set_materials(*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_materials(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_structure_set_materials__SWIG_3(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_bool(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_structure_set_materials__SWIG_2(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_bool(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_structure_set_materials__SWIG_1(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_bool(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_structure_set_materials__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'structure_set_materials'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::structure::set_materials(meep::material_function &,bool,double,int)\n"
    "    meep::structure::set_materials(meep::material_function &,bool,double)\n"
    "    meep::structure::set_materials(meep::material_function &,bool)\n"
    "    meep::structure::set_materials(meep::material_function &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_structure_set_chi1inv__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::component arg2 ;
  meep::material_function *arg3 = 0 ;
  bool arg4 ;
  double arg5 ;
  int arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_chi1inv", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_chi1inv" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "structure_set_chi1inv" "', argument " "3"" of type '" "meep::material_function &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_set_chi1inv" "', argument " "3"" of type '" "meep::material_function &""'"); 
  }
  arg3 = reinterpret_cast< meep::material_function * >(argp3);
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "structure_set_chi1inv" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "structure_set_chi1inv" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "structure_set_chi1inv" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  {
    try {
      (arg1)->set_chi1inv(arg2,*arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_chi1inv__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::component arg2 ;
  meep::material_function *arg3 = 0 ;
  bool arg4 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_chi1inv", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_chi1inv" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "structure_set_chi1inv" "', argument " "3"" of type '" "meep::material_function &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_set_chi1inv" "', argument " "3"" of type '" "meep::material_function &""'"); 
  }
  arg3 = reinterpret_cast< meep::material_function * >(argp3);
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "structure_set_chi1inv" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "structure_set_chi1inv" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      (arg1)->set_chi1inv(arg2,*arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_chi1inv__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::component arg2 ;
  meep::material_function *arg3 = 0 ;
  bool arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_chi1inv", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_chi1inv" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "structure_set_chi1inv" "', argument " "3"" of type '" "meep::material_function &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_set_chi1inv" "', argument " "3"" of type '" "meep::material_function &""'"); 
  }
  arg3 = reinterpret_cast< meep::material_function * >(argp3);
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "structure_set_chi1inv" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  {
    try {
      (arg1)->set_chi1inv(arg2,*arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_chi1inv__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::component arg2 ;
  meep::material_function *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_chi1inv", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_chi1inv" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "structure_set_chi1inv" "', argument " "3"" of type '" "meep::material_function &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_set_chi1inv" "', argument " "3"" of type '" "meep::material_function &""'"); 
  }
  arg3 = reinterpret_cast< meep::material_function * >(argp3);
  {
    try {
      (arg1)->set_chi1inv(arg2,*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_chi1inv(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[7] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_structure_set_chi1inv__SWIG_3(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_structure_set_chi1inv__SWIG_2(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_structure_set_chi1inv__SWIG_1(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_structure_set_chi1inv__SWIG_0(self, args);
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'structure_set_chi1inv'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::structure::set_chi1inv(meep::component,meep::material_function &,bool,double,int)\n"
    "    meep::structure::set_chi1inv(meep::component,meep::material_function &,bool,double)\n"
    "    meep::structure::set_chi1inv(meep::component,meep::material_function &,bool)\n"
    "    meep::structure::set_chi1inv(meep::component,meep::material_function &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_structure_has_chi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "structure_has_chi", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_has_chi" "', argument " "1"" of type '" "meep::structure const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_has_chi" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  {
    try {
      result = (bool)((meep::structure const *)arg1)->has_chi(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_epsilon__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::material_function *arg2 = 0 ;
  bool arg3 ;
  double arg4 ;
  int arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_epsilon", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_epsilon" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_set_epsilon" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_set_epsilon" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  arg2 = reinterpret_cast< meep::material_function * >(argp2);
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_set_epsilon" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "structure_set_epsilon" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "structure_set_epsilon" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    try {
      (arg1)->set_epsilon(*arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_epsilon__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::material_function *arg2 = 0 ;
  bool arg3 ;
  double arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_epsilon", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_epsilon" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_set_epsilon" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_set_epsilon" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  arg2 = reinterpret_cast< meep::material_function * >(argp2);
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_set_epsilon" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "structure_set_epsilon" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  {
    try {
      (arg1)->set_epsilon(*arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_epsilon__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::material_function *arg2 = 0 ;
  bool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_epsilon", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_epsilon" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_set_epsilon" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_set_epsilon" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  arg2 = reinterpret_cast< meep::material_function * >(argp2);
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_set_epsilon" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      (arg1)->set_epsilon(*arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_epsilon__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::material_function *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_epsilon", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_epsilon" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_set_epsilon" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_set_epsilon" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  arg2 = reinterpret_cast< meep::material_function * >(argp2);
  {
    try {
      (arg1)->set_epsilon(*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_epsilon__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ;
  bool arg3 ;
  double arg4 ;
  int arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_epsilon", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_epsilon" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if (obj1 == Py_None) {
      arg2 = NULL;
      py_callback = NULL;
    } else {
      arg2 = py_callback_wrap;
      py_callback = obj1;
      Py_INCREF(py_callback);
    }
  }
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_set_epsilon" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "structure_set_epsilon" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "structure_set_epsilon" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    try {
      (arg1)->set_epsilon(arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    Py_XDECREF(py_callback);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_callback);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_epsilon__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ;
  bool arg3 ;
  double arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_epsilon", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_epsilon" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if (obj1 == Py_None) {
      arg2 = NULL;
      py_callback = NULL;
    } else {
      arg2 = py_callback_wrap;
      py_callback = obj1;
      Py_INCREF(py_callback);
    }
  }
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_set_epsilon" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "structure_set_epsilon" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  {
    try {
      (arg1)->set_epsilon(arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    Py_XDECREF(py_callback);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_callback);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_epsilon__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ;
  bool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_epsilon", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_epsilon" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if (obj1 == Py_None) {
      arg2 = NULL;
      py_callback = NULL;
    } else {
      arg2 = py_callback_wrap;
      py_callback = obj1;
      Py_INCREF(py_callback);
    }
  }
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_set_epsilon" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      (arg1)->set_epsilon(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    Py_XDECREF(py_callback);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_callback);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_epsilon__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_epsilon", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_epsilon" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if (obj1 == Py_None) {
      arg2 = NULL;
      py_callback = NULL;
    } else {
      arg2 = py_callback_wrap;
      py_callback = obj1;
      Py_INCREF(py_callback);
    }
  }
  {
    try {
      (arg1)->set_epsilon(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    Py_XDECREF(py_callback);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_callback);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_epsilon(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_structure_set_epsilon__SWIG_3(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyCallable_Check(argv[1]) || argv[1] == Py_None;
      }
      if (_v) {
        return _wrap_structure_set_epsilon__SWIG_7(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyCallable_Check(argv[1]) || argv[1] == Py_None;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_bool(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_structure_set_epsilon__SWIG_6(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_bool(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_structure_set_epsilon__SWIG_2(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_bool(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_structure_set_epsilon__SWIG_1(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyCallable_Check(argv[1]) || argv[1] == Py_None;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_bool(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_structure_set_epsilon__SWIG_5(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyCallable_Check(argv[1]) || argv[1] == Py_None;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_bool(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_structure_set_epsilon__SWIG_4(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_bool(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_structure_set_epsilon__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'structure_set_epsilon'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::structure::set_epsilon(meep::material_function &,bool,double,int)\n"
    "    meep::structure::set_epsilon(meep::material_function &,bool,double)\n"
    "    meep::structure::set_epsilon(meep::material_function &,bool)\n"
    "    meep::structure::set_epsilon(meep::material_function &)\n"
    "    meep::structure::set_epsilon(double (*)(meep::vec const &),bool,double,int)\n"
    "    meep::structure::set_epsilon(double (*)(meep::vec const &),bool,double)\n"
    "    meep::structure::set_epsilon(double (*)(meep::vec const &),bool)\n"
    "    meep::structure::set_epsilon(double (*)(meep::vec const &))\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_structure_set_mu__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::material_function *arg2 = 0 ;
  bool arg3 ;
  double arg4 ;
  int arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_mu", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_mu" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_set_mu" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_set_mu" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  arg2 = reinterpret_cast< meep::material_function * >(argp2);
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_set_mu" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "structure_set_mu" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "structure_set_mu" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    try {
      (arg1)->set_mu(*arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_mu__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::material_function *arg2 = 0 ;
  bool arg3 ;
  double arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_mu", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_mu" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_set_mu" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_set_mu" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  arg2 = reinterpret_cast< meep::material_function * >(argp2);
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_set_mu" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "structure_set_mu" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  {
    try {
      (arg1)->set_mu(*arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_mu__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::material_function *arg2 = 0 ;
  bool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_mu", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_mu" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_set_mu" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_set_mu" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  arg2 = reinterpret_cast< meep::material_function * >(argp2);
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_set_mu" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      (arg1)->set_mu(*arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_mu__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::material_function *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_mu", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_mu" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_set_mu" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_set_mu" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  arg2 = reinterpret_cast< meep::material_function * >(argp2);
  {
    try {
      (arg1)->set_mu(*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_mu__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ;
  bool arg3 ;
  double arg4 ;
  int arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_mu", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_mu" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if (obj1 == Py_None) {
      arg2 = NULL;
      py_callback = NULL;
    } else {
      arg2 = py_callback_wrap;
      py_callback = obj1;
      Py_INCREF(py_callback);
    }
  }
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_set_mu" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "structure_set_mu" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "structure_set_mu" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    try {
      (arg1)->set_mu(arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    Py_XDECREF(py_callback);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_callback);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_mu__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ;
  bool arg3 ;
  double arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_mu", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_mu" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if (obj1 == Py_None) {
      arg2 = NULL;
      py_callback = NULL;
    } else {
      arg2 = py_callback_wrap;
      py_callback = obj1;
      Py_INCREF(py_callback);
    }
  }
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_set_mu" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "structure_set_mu" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  {
    try {
      (arg1)->set_mu(arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    Py_XDECREF(py_callback);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_callback);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_mu__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ;
  bool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_mu", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_mu" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if (obj1 == Py_None) {
      arg2 = NULL;
      py_callback = NULL;
    } else {
      arg2 = py_callback_wrap;
      py_callback = obj1;
      Py_INCREF(py_callback);
    }
  }
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_set_mu" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      (arg1)->set_mu(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    Py_XDECREF(py_callback);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_callback);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_mu__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_mu", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_mu" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if (obj1 == Py_None) {
      arg2 = NULL;
      py_callback = NULL;
    } else {
      arg2 = py_callback_wrap;
      py_callback = obj1;
      Py_INCREF(py_callback);
    }
  }
  {
    try {
      (arg1)->set_mu(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    Py_XDECREF(py_callback);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_callback);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_mu(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_structure_set_mu__SWIG_3(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyCallable_Check(argv[1]) || argv[1] == Py_None;
      }
      if (_v) {
        return _wrap_structure_set_mu__SWIG_7(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyCallable_Check(argv[1]) || argv[1] == Py_None;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_bool(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_structure_set_mu__SWIG_6(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_bool(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_structure_set_mu__SWIG_2(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_bool(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_structure_set_mu__SWIG_1(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyCallable_Check(argv[1]) || argv[1] == Py_None;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_bool(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_structure_set_mu__SWIG_5(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyCallable_Check(argv[1]) || argv[1] == Py_None;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_bool(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_structure_set_mu__SWIG_4(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_bool(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_structure_set_mu__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'structure_set_mu'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::structure::set_mu(meep::material_function &,bool,double,int)\n"
    "    meep::structure::set_mu(meep::material_function &,bool,double)\n"
    "    meep::structure::set_mu(meep::material_function &,bool)\n"
    "    meep::structure::set_mu(meep::material_function &)\n"
    "    meep::structure::set_mu(double (*)(meep::vec const &),bool,double,int)\n"
    "    meep::structure::set_mu(double (*)(meep::vec const &),bool,double)\n"
    "    meep::structure::set_mu(double (*)(meep::vec const &),bool)\n"
    "    meep::structure::set_mu(double (*)(meep::vec const &))\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_structure_set_conductivity__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::component arg2 ;
  meep::material_function *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_conductivity", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_conductivity" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "structure_set_conductivity" "', argument " "3"" of type '" "meep::material_function &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_set_conductivity" "', argument " "3"" of type '" "meep::material_function &""'"); 
  }
  arg3 = reinterpret_cast< meep::material_function * >(argp3);
  {
    try {
      (arg1)->set_conductivity(arg2,*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_conductivity__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::component arg2 ;
  double (*arg3)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_conductivity", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_conductivity" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    if (obj2 == Py_None) {
      arg3 = NULL;
      py_callback = NULL;
    } else {
      arg3 = py_callback_wrap;
      py_callback = obj2;
      Py_INCREF(py_callback);
    }
  }
  {
    try {
      (arg1)->set_conductivity(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    Py_XDECREF(py_callback);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_callback);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_conductivity(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_structure_set_conductivity__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          _v = PyCallable_Check(argv[2]) || argv[2] == Py_None;
        }
        if (_v) {
          return _wrap_structure_set_conductivity__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'structure_set_conductivity'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::structure::set_conductivity(meep::component,meep::material_function &)\n"
    "    meep::structure::set_conductivity(meep::component,double (*)(meep::vec const &))\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_structure_set_chi3__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::component arg2 ;
  meep::material_function *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_chi3", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_chi3" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "structure_set_chi3" "', argument " "3"" of type '" "meep::material_function &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_set_chi3" "', argument " "3"" of type '" "meep::material_function &""'"); 
  }
  arg3 = reinterpret_cast< meep::material_function * >(argp3);
  {
    try {
      (arg1)->set_chi3(arg2,*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_chi3__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::material_function *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_chi3", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_chi3" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_set_chi3" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_set_chi3" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  arg2 = reinterpret_cast< meep::material_function * >(argp2);
  {
    try {
      (arg1)->set_chi3(*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_chi3__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_chi3", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_chi3" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if (obj1 == Py_None) {
      arg2 = NULL;
      py_callback = NULL;
    } else {
      arg2 = py_callback_wrap;
      py_callback = obj1;
      Py_INCREF(py_callback);
    }
  }
  {
    try {
      (arg1)->set_chi3(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    Py_XDECREF(py_callback);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_callback);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_chi3(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_structure_set_chi3__SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyCallable_Check(argv[1]) || argv[1] == Py_None;
      }
      if (_v) {
        return _wrap_structure_set_chi3__SWIG_2(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_structure_set_chi3__SWIG_0(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'structure_set_chi3'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::structure::set_chi3(meep::component,meep::material_function &)\n"
    "    meep::structure::set_chi3(meep::material_function &)\n"
    "    meep::structure::set_chi3(double (*)(meep::vec const &))\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_structure_set_chi2__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::component arg2 ;
  meep::material_function *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_chi2", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_chi2" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "structure_set_chi2" "', argument " "3"" of type '" "meep::material_function &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_set_chi2" "', argument " "3"" of type '" "meep::material_function &""'"); 
  }
  arg3 = reinterpret_cast< meep::material_function * >(argp3);
  {
    try {
      (arg1)->set_chi2(arg2,*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_chi2__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::material_function *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_chi2", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_chi2" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_set_chi2" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_set_chi2" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  arg2 = reinterpret_cast< meep::material_function * >(argp2);
  {
    try {
      (arg1)->set_chi2(*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_chi2__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_chi2", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_chi2" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if (obj1 == Py_None) {
      arg2 = NULL;
      py_callback = NULL;
    } else {
      arg2 = py_callback_wrap;
      py_callback = obj1;
      Py_INCREF(py_callback);
    }
  }
  {
    try {
      (arg1)->set_chi2(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    Py_XDECREF(py_callback);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_callback);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_chi2(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_structure_set_chi2__SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyCallable_Check(argv[1]) || argv[1] == Py_None;
      }
      if (_v) {
        return _wrap_structure_set_chi2__SWIG_2(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_structure_set_chi2__SWIG_0(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'structure_set_chi2'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::structure::set_chi2(meep::component,meep::material_function &)\n"
    "    meep::structure::set_chi2(meep::material_function &)\n"
    "    meep::structure::set_chi2(double (*)(meep::vec const &))\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_structure_add_susceptibility__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ;
  meep::field_type arg3 ;
  meep::susceptibility *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_add_susceptibility", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_add_susceptibility" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if (obj1 == Py_None) {
      arg2 = NULL;
      py_callback = NULL;
    } else {
      arg2 = py_callback_wrap;
      py_callback = obj1;
      Py_INCREF(py_callback);
    }
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_add_susceptibility" "', argument " "3"" of type '" "meep::field_type""'");
  } 
  arg3 = static_cast< meep::field_type >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__susceptibility,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "structure_add_susceptibility" "', argument " "4"" of type '" "meep::susceptibility const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_add_susceptibility" "', argument " "4"" of type '" "meep::susceptibility const &""'"); 
  }
  arg4 = reinterpret_cast< meep::susceptibility * >(argp4);
  {
    try {
      (arg1)->add_susceptibility(arg2,arg3,(meep::susceptibility const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    Py_XDECREF(py_callback);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_callback);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_add_susceptibility__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::material_function *arg2 = 0 ;
  meep::field_type arg3 ;
  meep::susceptibility *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_add_susceptibility", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_add_susceptibility" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__material_function,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_add_susceptibility" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_add_susceptibility" "', argument " "2"" of type '" "meep::material_function &""'"); 
  }
  arg2 = reinterpret_cast< meep::material_function * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_add_susceptibility" "', argument " "3"" of type '" "meep::field_type""'");
  } 
  arg3 = static_cast< meep::field_type >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__susceptibility,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "structure_add_susceptibility" "', argument " "4"" of type '" "meep::susceptibility const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_add_susceptibility" "', argument " "4"" of type '" "meep::susceptibility const &""'"); 
  }
  arg4 = reinterpret_cast< meep::susceptibility * >(argp4);
  {
    try {
      (arg1)->add_susceptibility(*arg2,arg3,(meep::susceptibility const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_add_susceptibility(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyCallable_Check(argv[1]) || argv[1] == Py_None;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__susceptibility, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_structure_add_susceptibility__SWIG_0(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__material_function, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__susceptibility, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_structure_add_susceptibility__SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'structure_add_susceptibility'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::structure::add_susceptibility(double (*)(meep::vec const &),meep::field_type,meep::susceptibility const &)\n"
    "    meep::structure::add_susceptibility(meep::material_function &,meep::field_type,meep::susceptibility const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_structure_remove_susceptibilities(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_remove_susceptibilities", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_remove_susceptibilities" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    try {
      (arg1)->remove_susceptibilities();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_set_output_directory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_set_output_directory", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_set_output_directory" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_set_output_directory" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try {
      (arg1)->set_output_directory((char const *)arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_mix_with(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::structure *arg2 = (meep::structure *) 0 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_mix_with", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_mix_with" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_mix_with" "', argument " "2"" of type '" "meep::structure const *""'"); 
  }
  arg2 = reinterpret_cast< meep::structure * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_mix_with" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      (arg1)->mix_with((meep::structure const *)arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_equal_layout(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::structure *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "structure_equal_layout", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_equal_layout" "', argument " "1"" of type '" "meep::structure const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__structure,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_equal_layout" "', argument " "2"" of type '" "meep::structure const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_equal_layout" "', argument " "2"" of type '" "meep::structure const &""'"); 
  }
  arg2 = reinterpret_cast< meep::structure * >(argp2);
  {
    try {
      result = (bool)((meep::structure const *)arg1)->equal_layout((meep::structure const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_print_layout(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_print_layout", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_print_layout" "', argument " "1"" of type '" "meep::structure const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    try {
      ((meep::structure const *)arg1)->print_layout();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_get_chunk_volumes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > result;
  
  if (!PyArg_UnpackTuple(args, "structure_get_chunk_volumes", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_get_chunk_volumes" "', argument " "1"" of type '" "meep::structure const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    try {
      result = ((meep::structure const *)arg1)->get_chunk_volumes();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = swig::from(static_cast< std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_get_chunk_owners(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< int,std::allocator< int > > result;
  
  if (!PyArg_UnpackTuple(args, "structure_get_chunk_owners", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_get_chunk_owners" "', argument " "1"" of type '" "meep::structure const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    try {
      result = ((meep::structure const *)arg1)->get_chunk_owners();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    npy_intp vec_len = (npy_intp) (&result)->size();
    resultobj = PyArray_SimpleNew(1, &vec_len, NPY_INT);
    memcpy(PyArray_DATA((PyArrayObject*) resultobj), &result[0], vec_len * sizeof(int));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_dump__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  char *arg2 = (char *) 0 ;
  bool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_dump", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_dump" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_dump" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_dump" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      (arg1)->dump((char const *)arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_dump__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_dump", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_dump" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_dump" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try {
      (arg1)->dump((char const *)arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_dump(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_structure_dump__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_bool(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_structure_dump__SWIG_0(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'structure_dump'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::structure::dump(char const *,bool)\n"
    "    meep::structure::dump(char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_structure_load__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  char *arg2 = (char *) 0 ;
  bool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_load", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_load" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_load" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_load" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      (arg1)->load((char const *)arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_load__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_load", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_load" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_load" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try {
      (arg1)->load((char const *)arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_load(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_structure_load__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_bool(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_structure_load__SWIG_0(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'structure_load'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::structure::load(char const *,bool)\n"
    "    meep::structure::load(char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_structure_dump_chunk_layout(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_dump_chunk_layout", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_dump_chunk_layout" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_dump_chunk_layout" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try {
      (arg1)->dump_chunk_layout((char const *)arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_load_chunk_layout__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  char *arg2 = (char *) 0 ;
  meep::boundary_region *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_load_chunk_layout", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_load_chunk_layout" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_load_chunk_layout" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__boundary_region,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "structure_load_chunk_layout" "', argument " "3"" of type '" "meep::boundary_region &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_load_chunk_layout" "', argument " "3"" of type '" "meep::boundary_region &""'"); 
  }
  arg3 = reinterpret_cast< meep::boundary_region * >(argp3);
  {
    try {
      (arg1)->load_chunk_layout((char const *)arg2,*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_load_chunk_layout__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > *arg2 = 0 ;
  std::vector< int,std::allocator< int > > *arg3 = 0 ;
  meep::boundary_region *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  int res3 = SWIG_OLDOBJ ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_load_chunk_layout", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_load_chunk_layout" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > *ptr = (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > *)0;
    res2 = swig::asptr(obj1, &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_load_chunk_layout" "', argument " "2"" of type '" "std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_load_chunk_layout" "', argument " "2"" of type '" "std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > const &""'"); 
    }
    arg2 = ptr;
  }
  {
    std::vector< int,std::allocator< int > > *ptr = (std::vector< int,std::allocator< int > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "structure_load_chunk_layout" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_load_chunk_layout" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > > const &""'"); 
    }
    arg3 = ptr;
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__boundary_region,  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "structure_load_chunk_layout" "', argument " "4"" of type '" "meep::boundary_region &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_load_chunk_layout" "', argument " "4"" of type '" "meep::boundary_region &""'"); 
  }
  arg4 = reinterpret_cast< meep::boundary_region * >(argp4);
  {
    try {
      (arg1)->load_chunk_layout((std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > const &)*arg2,(std::vector< int,std::allocator< int > > const &)*arg3,*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_load_chunk_layout(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_structure_load_chunk_layout__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = swig::asptr(argv[1], (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > >**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< int,std::allocator< int > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__boundary_region, SWIG_POINTER_NO_NULL);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_structure_load_chunk_layout__SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'structure_load_chunk_layout'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::structure::load_chunk_layout(char const *,meep::boundary_region &)\n"
    "    meep::structure::load_chunk_layout(std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > const &,std::vector< int,std::allocator< int > > const &,meep::boundary_region &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_structure_get_chi1inv__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  meep::ivec *arg4 = 0 ;
  double arg5 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "structure_get_chi1inv", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_get_chi1inv" "', argument " "1"" of type '" "meep::structure const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_get_chi1inv" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "structure_get_chi1inv" "', argument " "4"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_get_chi1inv" "', argument " "4"" of type '" "meep::ivec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::ivec * >(argp4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "structure_get_chi1inv" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "structure_get_chi1inv" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      result = ((meep::structure const *)arg1)->get_chi1inv(arg2,arg3,(meep::ivec const &)*arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_get_chi1inv__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  meep::ivec *arg4 = 0 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "structure_get_chi1inv", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_get_chi1inv" "', argument " "1"" of type '" "meep::structure const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_get_chi1inv" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "structure_get_chi1inv" "', argument " "4"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_get_chi1inv" "', argument " "4"" of type '" "meep::ivec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::ivec * >(argp4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "structure_get_chi1inv" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      result = ((meep::structure const *)arg1)->get_chi1inv(arg2,arg3,(meep::ivec const &)*arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_get_chi1inv__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  meep::ivec *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "structure_get_chi1inv", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_get_chi1inv" "', argument " "1"" of type '" "meep::structure const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_get_chi1inv" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "structure_get_chi1inv" "', argument " "4"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_get_chi1inv" "', argument " "4"" of type '" "meep::ivec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::ivec * >(argp4);
  {
    try {
      result = ((meep::structure const *)arg1)->get_chi1inv(arg2,arg3,(meep::ivec const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_get_chi1inv__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  meep::vec *arg4 = 0 ;
  double arg5 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "structure_get_chi1inv", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_get_chi1inv" "', argument " "1"" of type '" "meep::structure const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_get_chi1inv" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "structure_get_chi1inv" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_get_chi1inv" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::vec * >(argp4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "structure_get_chi1inv" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "structure_get_chi1inv" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      result = ((meep::structure const *)arg1)->get_chi1inv(arg2,arg3,(meep::vec const &)*arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_get_chi1inv__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  meep::vec *arg4 = 0 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "structure_get_chi1inv", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_get_chi1inv" "', argument " "1"" of type '" "meep::structure const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_get_chi1inv" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "structure_get_chi1inv" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_get_chi1inv" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::vec * >(argp4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "structure_get_chi1inv" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      result = ((meep::structure const *)arg1)->get_chi1inv(arg2,arg3,(meep::vec const &)*arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_get_chi1inv__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  meep::vec *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "structure_get_chi1inv", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_get_chi1inv" "', argument " "1"" of type '" "meep::structure const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_get_chi1inv" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "structure_get_chi1inv" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_get_chi1inv" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::vec * >(argp4);
  {
    try {
      result = ((meep::structure const *)arg1)->get_chi1inv(arg2,arg3,(meep::vec const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_get_chi1inv(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[7] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_structure_get_chi1inv__SWIG_2(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_structure_get_chi1inv__SWIG_5(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_structure_get_chi1inv__SWIG_4(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_structure_get_chi1inv__SWIG_1(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_structure_get_chi1inv__SWIG_0(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_structure_get_chi1inv__SWIG_3(self, args);
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'structure_get_chi1inv'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::structure::get_chi1inv(meep::component,meep::direction,meep::ivec const &,double,bool) const\n"
    "    meep::structure::get_chi1inv(meep::component,meep::direction,meep::ivec const &,double) const\n"
    "    meep::structure::get_chi1inv(meep::component,meep::direction,meep::ivec const &) const\n"
    "    meep::structure::get_chi1inv(meep::component,meep::direction,meep::vec const &,double,bool) const\n"
    "    meep::structure::get_chi1inv(meep::component,meep::direction,meep::vec const &,double) const\n"
    "    meep::structure::get_chi1inv(meep::component,meep::direction,meep::vec const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_structure_get_inveps__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  meep::ivec *arg4 = 0 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "structure_get_inveps", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_get_inveps" "', argument " "1"" of type '" "meep::structure const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_get_inveps" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "structure_get_inveps" "', argument " "4"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_get_inveps" "', argument " "4"" of type '" "meep::ivec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::ivec * >(argp4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "structure_get_inveps" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      result = ((meep::structure const *)arg1)->get_inveps(arg2,arg3,(meep::ivec const &)*arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_get_inveps__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  meep::ivec *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "structure_get_inveps", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_get_inveps" "', argument " "1"" of type '" "meep::structure const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_get_inveps" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "structure_get_inveps" "', argument " "4"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_get_inveps" "', argument " "4"" of type '" "meep::ivec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::ivec * >(argp4);
  {
    try {
      result = ((meep::structure const *)arg1)->get_inveps(arg2,arg3,(meep::ivec const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_get_inveps__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  meep::vec *arg4 = 0 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "structure_get_inveps", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_get_inveps" "', argument " "1"" of type '" "meep::structure const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_get_inveps" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "structure_get_inveps" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_get_inveps" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::vec * >(argp4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "structure_get_inveps" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      result = ((meep::structure const *)arg1)->get_inveps(arg2,arg3,(meep::vec const &)*arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_get_inveps__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  meep::vec *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "structure_get_inveps", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_get_inveps" "', argument " "1"" of type '" "meep::structure const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_get_inveps" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "structure_get_inveps" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_get_inveps" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::vec * >(argp4);
  {
    try {
      result = ((meep::structure const *)arg1)->get_inveps(arg2,arg3,(meep::vec const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_get_inveps(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_structure_get_inveps__SWIG_1(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_structure_get_inveps__SWIG_3(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_structure_get_inveps__SWIG_2(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_structure_get_inveps__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'structure_get_inveps'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::structure::get_inveps(meep::component,meep::direction,meep::ivec const &,double) const\n"
    "    meep::structure::get_inveps(meep::component,meep::direction,meep::ivec const &) const\n"
    "    meep::structure::get_inveps(meep::component,meep::direction,meep::vec const &,double) const\n"
    "    meep::structure::get_inveps(meep::component,meep::direction,meep::vec const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_structure_get_eps__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::vec *arg2 = 0 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "structure_get_eps", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_get_eps" "', argument " "1"" of type '" "meep::structure const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_get_eps" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_get_eps" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_get_eps" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      result = ((meep::structure const *)arg1)->get_eps((meep::vec const &)*arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_get_eps__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "structure_get_eps", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_get_eps" "', argument " "1"" of type '" "meep::structure const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_get_eps" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_get_eps" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = ((meep::structure const *)arg1)->get_eps((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_get_eps(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_structure_get_eps__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_structure_get_eps__SWIG_0(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'structure_get_eps'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::structure::get_eps(meep::vec const &,double) const\n"
    "    meep::structure::get_eps(meep::vec const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_structure_get_mu__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::vec *arg2 = 0 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "structure_get_mu", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_get_mu" "', argument " "1"" of type '" "meep::structure const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_get_mu" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_get_mu" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "structure_get_mu" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      result = ((meep::structure const *)arg1)->get_mu((meep::vec const &)*arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_get_mu__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "structure_get_mu", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_get_mu" "', argument " "1"" of type '" "meep::structure const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "structure_get_mu" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "structure_get_mu" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = ((meep::structure const *)arg1)->get_mu((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_get_mu(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_structure_get_mu__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_structure_get_mu__SWIG_0(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'structure_get_mu'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::structure::get_mu(meep::vec const &,double) const\n"
    "    meep::structure::get_mu(meep::vec const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_structure_max_eps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "structure_max_eps", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_max_eps" "', argument " "1"" of type '" "meep::structure const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    try {
      result = (double)((meep::structure const *)arg1)->max_eps();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_estimated_cost__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "structure_estimated_cost", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_estimated_cost" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "structure_estimated_cost" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      result = (double)(arg1)->estimated_cost(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_estimated_cost__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "structure_estimated_cost", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_estimated_cost" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    try {
      result = (double)(arg1)->estimated_cost();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_structure_estimated_cost(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_structure_estimated_cost__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_structure_estimated_cost__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'structure_estimated_cost'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::structure::estimated_cost(int)\n"
    "    meep::structure::estimated_cost()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_structure_get_binary_partition(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::binary_partition *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "structure_get_binary_partition", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "structure_get_binary_partition" "', argument " "1"" of type '" "meep::structure const *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    try {
      result = (meep::binary_partition *)((meep::structure const *)arg1)->get_binary_partition();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    resultobj = bp_to_py_bp(result);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *structure_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__structure, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *structure_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_split_by_binarytree(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume arg1 ;
  std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > *arg2 = 0 ;
  std::vector< int,std::allocator< int > > *arg3 = 0 ;
  meep::binary_partition *arg4 = (meep::binary_partition *) 0 ;
  void *argp1 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  std::unique_ptr< meep::binary_partition > temp4 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  {
    arg4 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "split_by_binarytree", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  {
    res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__grid_volume,  0  | 0);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "split_by_binarytree" "', argument " "1"" of type '" "meep::grid_volume""'"); 
    }  
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "split_by_binarytree" "', argument " "1"" of type '" "meep::grid_volume""'");
    } else {
      meep::grid_volume * temp = reinterpret_cast< meep::grid_volume * >(argp1);
      arg1 = *temp;
      if (SWIG_IsNewObj(res1)) delete temp;
    }
  }
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "split_by_binarytree" "', argument " "2"" of type '" "std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "split_by_binarytree" "', argument " "2"" of type '" "std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorT_int_std__allocatorT_int_t_t,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "split_by_binarytree" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > > &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "split_by_binarytree" "', argument " "3"" of type '" "std::vector< int,std::allocator< int > > &""'"); 
  }
  arg3 = reinterpret_cast< std::vector< int,std::allocator< int > > * >(argp3);
  {
    temp4 = py_bp_to_bp(obj3);
    arg4 = temp4.get();
  }
  {
    try {
      meep::split_by_binarytree(arg1,*arg2,*arg3,(meep::binary_partition const *)arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_src_time_is_integrated_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::src_time *arg1 = (meep::src_time *) 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "src_time_is_integrated_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "src_time_is_integrated_set" "', argument " "1"" of type '" "meep::src_time *""'"); 
  }
  arg1 = reinterpret_cast< meep::src_time * >(argp1);
  ecode2 = SWIG_AsVal_bool(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "src_time_is_integrated_set" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  if (arg1) (arg1)->is_integrated = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_src_time_is_integrated_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::src_time *arg1 = (meep::src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "src_time_is_integrated_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "src_time_is_integrated_get" "', argument " "1"" of type '" "meep::src_time *""'"); 
  }
  arg1 = reinterpret_cast< meep::src_time * >(argp1);
  result = (bool) ((arg1)->is_integrated);
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_src_time_id_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::src_time *arg1 = (meep::src_time *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "src_time_id_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "src_time_id_set" "', argument " "1"" of type '" "meep::src_time *""'"); 
  }
  arg1 = reinterpret_cast< meep::src_time * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "src_time_id_set" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  if (arg1) (arg1)->id = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_src_time_id_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::src_time *arg1 = (meep::src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  size_t result;
  
  if (!PyArg_UnpackTuple(args, "src_time_id_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "src_time_id_get" "', argument " "1"" of type '" "meep::src_time *""'"); 
  }
  arg1 = reinterpret_cast< meep::src_time * >(argp1);
  result =  ((arg1)->id);
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_src_time__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_src_time", 0, 0)) SWIG_fail;
  {
    try {
      result = (meep::src_time *)new meep::src_time();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__src_time, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_src_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::src_time *arg1 = (meep::src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_src_time", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__src_time, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_src_time" "', argument " "1"" of type '" "meep::src_time *""'"); 
  }
  arg1 = reinterpret_cast< meep::src_time * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_src_time__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::src_time *arg1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_src_time", 1, 1, &obj0)) SWIG_fail;
  {
    PyObject *swig_obj = NULL;
    void *tmp_ptr = 0;
    int tmp_res = 0;
    
    if(PyObject_IsInstance(obj0, py_source_time_object())) {
      swig_obj = PyObject_GetAttrString(obj0, "swigobj");
    } else if(PyObject_IsInstance(obj0, py_meep_src_time_object())) {
      swig_obj = obj0;
      Py_XINCREF(swig_obj);
    } else {
      meep::abort("Expected a meep.source.SourceTime or a meep.src_time\n");
    }
    
    tmp_res = SWIG_ConvertPtr(swig_obj, &tmp_ptr, SWIGTYPE_p_meep__src_time, 0);
    Py_XDECREF(swig_obj);
    
    if(!SWIG_IsOK(tmp_res)) {
      SWIG_exception_fail(SWIG_ArgError(tmp_res), "Couldn't convert Python object to meep::src_time");
    }
    arg1 = reinterpret_cast<meep::src_time *>(tmp_ptr);
    
  }
  {
    try {
      result = (meep::src_time *)new meep::src_time((meep::src_time const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__src_time, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_src_time(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[2] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_src_time__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    {
      int py_source_time = PyObject_IsInstance(argv[0], py_source_time_object());
      int swig_src_time = PyObject_IsInstance(argv[0], py_meep_src_time_object());
      
      _v = py_source_time || swig_src_time;
    }
    if (_v) {
      return _wrap_new_src_time__SWIG_1(self, args);
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_src_time'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::src_time::src_time()\n"
    "    meep::src_time::src_time(meep::src_time const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_src_time_dipole__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::src_time *arg1 = (meep::src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "src_time_dipole", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "src_time_dipole" "', argument " "1"" of type '" "meep::src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::src_time * >(argp1);
  {
    try {
      result = ((meep::src_time const *)arg1)->dipole();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_src_time_current__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::src_time *arg1 = (meep::src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "src_time_current", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "src_time_current" "', argument " "1"" of type '" "meep::src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::src_time * >(argp1);
  {
    try {
      result = ((meep::src_time const *)arg1)->current();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_src_time_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::src_time *arg1 = (meep::src_time *) 0 ;
  double arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "src_time_update", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "src_time_update" "', argument " "1"" of type '" "meep::src_time *""'"); 
  }
  arg1 = reinterpret_cast< meep::src_time * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "src_time_update" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "src_time_update" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      (arg1)->update(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_src_time_current__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::src_time *arg1 = (meep::src_time *) 0 ;
  double arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "src_time_current", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "src_time_current" "', argument " "1"" of type '" "meep::src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::src_time * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "src_time_current" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "src_time_current" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      result = ((meep::src_time const *)arg1)->current(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_src_time_current(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__src_time, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_src_time_current__SWIG_0(self, args);
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__src_time, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_src_time_current__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'src_time_current'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::src_time::current() const\n"
    "    meep::src_time::current(double,double) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_src_time_last_time_max__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::src_time *arg1 = (meep::src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "src_time_last_time_max", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "src_time_last_time_max" "', argument " "1"" of type '" "meep::src_time *""'"); 
  }
  arg1 = reinterpret_cast< meep::src_time * >(argp1);
  {
    try {
      result = (double)(arg1)->last_time_max();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_src_time_last_time_max__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::src_time *arg1 = (meep::src_time *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "src_time_last_time_max", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "src_time_last_time_max" "', argument " "1"" of type '" "meep::src_time *""'"); 
  }
  arg1 = reinterpret_cast< meep::src_time * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "src_time_last_time_max" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = (double)(arg1)->last_time_max(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_src_time_last_time_max(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__src_time, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_src_time_last_time_max__SWIG_0(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__src_time, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_src_time_last_time_max__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'src_time_last_time_max'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::src_time::last_time_max()\n"
    "    meep::src_time::last_time_max(double)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_src_time_add_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::src_time *arg1 = (meep::src_time *) 0 ;
  meep::src_time *arg2 = (meep::src_time *) 0 ;
  meep::src_time **arg3 = (meep::src_time **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "src_time_add_to", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "src_time_add_to" "', argument " "1"" of type '" "meep::src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::src_time * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__src_time, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "src_time_add_to" "', argument " "2"" of type '" "meep::src_time *""'"); 
  }
  arg2 = reinterpret_cast< meep::src_time * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_p_meep__src_time, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "src_time_add_to" "', argument " "3"" of type '" "meep::src_time **""'"); 
  }
  arg3 = reinterpret_cast< meep::src_time ** >(argp3);
  {
    try {
      result = (meep::src_time *)((meep::src_time const *)arg1)->add_to(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__src_time, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_src_time_next_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::src_time *arg1 = (meep::src_time *) 0 ;
  meep::src_time *arg2 = (meep::src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "src_time_next_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "src_time_next_set" "', argument " "1"" of type '" "meep::src_time *""'"); 
  }
  arg1 = reinterpret_cast< meep::src_time * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__src_time, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "src_time_next_set" "', argument " "2"" of type '" "meep::src_time *""'"); 
  }
  arg2 = reinterpret_cast< meep::src_time * >(argp2);
  if (arg1) (arg1)->next = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_src_time_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::src_time *arg1 = (meep::src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "src_time_next_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "src_time_next_get" "', argument " "1"" of type '" "meep::src_time *""'"); 
  }
  arg1 = reinterpret_cast< meep::src_time * >(argp1);
  result = (meep::src_time *) ((arg1)->next);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__src_time, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_src_time_dipole__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::src_time *arg1 = (meep::src_time *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "src_time_dipole", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "src_time_dipole" "', argument " "1"" of type '" "meep::src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::src_time * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "src_time_dipole" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = ((meep::src_time const *)arg1)->dipole(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_src_time_dipole(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__src_time, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_src_time_dipole__SWIG_0(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__src_time, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_src_time_dipole__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'src_time_dipole'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::src_time::dipole() const\n"
    "    meep::src_time::dipole(double) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_src_time_last_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::src_time *arg1 = (meep::src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "src_time_last_time", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "src_time_last_time" "', argument " "1"" of type '" "meep::src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::src_time * >(argp1);
  {
    try {
      result = (double)((meep::src_time const *)arg1)->last_time();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_src_time_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::src_time *arg1 = (meep::src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "src_time_clone", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "src_time_clone" "', argument " "1"" of type '" "meep::src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::src_time * >(argp1);
  {
    try {
      result = (meep::src_time *)((meep::src_time const *)arg1)->clone();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__src_time, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_src_time_is_equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::src_time *arg1 = (meep::src_time *) 0 ;
  meep::src_time *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "src_time_is_equal", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "src_time_is_equal" "', argument " "1"" of type '" "meep::src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::src_time * >(argp1);
  {
    PyObject *swig_obj = NULL;
    void *tmp_ptr = 0;
    int tmp_res = 0;
    
    if(PyObject_IsInstance(obj1, py_source_time_object())) {
      swig_obj = PyObject_GetAttrString(obj1, "swigobj");
    } else if(PyObject_IsInstance(obj1, py_meep_src_time_object())) {
      swig_obj = obj1;
      Py_XINCREF(swig_obj);
    } else {
      meep::abort("Expected a meep.source.SourceTime or a meep.src_time\n");
    }
    
    tmp_res = SWIG_ConvertPtr(swig_obj, &tmp_ptr, SWIGTYPE_p_meep__src_time, 0);
    Py_XDECREF(swig_obj);
    
    if(!SWIG_IsOK(tmp_res)) {
      SWIG_exception_fail(SWIG_ArgError(tmp_res), "Couldn't convert Python object to meep::src_time");
    }
    arg2 = reinterpret_cast<meep::src_time *>(tmp_ptr);
    
  }
  {
    try {
      result = (bool)((meep::src_time const *)arg1)->is_equal((meep::src_time const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_src_time_frequency(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::src_time *arg1 = (meep::src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "src_time_frequency", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "src_time_frequency" "', argument " "1"" of type '" "meep::src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::src_time * >(argp1);
  {
    try {
      result = ((meep::src_time const *)arg1)->frequency();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_src_time_get_fwidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::src_time *arg1 = (meep::src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "src_time_get_fwidth", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "src_time_get_fwidth" "', argument " "1"" of type '" "meep::src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::src_time * >(argp1);
  {
    try {
      result = (double)((meep::src_time const *)arg1)->get_fwidth();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_src_time_set_fwidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::src_time *arg1 = (meep::src_time *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "src_time_set_fwidth", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "src_time_set_fwidth" "', argument " "1"" of type '" "meep::src_time *""'"); 
  }
  arg1 = reinterpret_cast< meep::src_time * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "src_time_set_fwidth" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      (arg1)->set_fwidth(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_src_time_set_frequency(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::src_time *arg1 = (meep::src_time *) 0 ;
  std::complex< double > arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::complex< double > val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "src_time_set_frequency", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "src_time_set_frequency" "', argument " "1"" of type '" "meep::src_time *""'"); 
  }
  arg1 = reinterpret_cast< meep::src_time * >(argp1);
  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "src_time_set_frequency" "', argument " "2"" of type '" "std::complex< double >""'");
  } 
  arg2 = static_cast< std::complex< double > >(val2);
  {
    try {
      (arg1)->set_frequency(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *src_time_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__src_time, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *src_time_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_src_times_equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::src_time *arg1 = 0 ;
  meep::src_time *arg2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "src_times_equal", 2, 2, &obj0, &obj1)) SWIG_fail;
  {
    PyObject *swig_obj = NULL;
    void *tmp_ptr = 0;
    int tmp_res = 0;
    
    if(PyObject_IsInstance(obj0, py_source_time_object())) {
      swig_obj = PyObject_GetAttrString(obj0, "swigobj");
    } else if(PyObject_IsInstance(obj0, py_meep_src_time_object())) {
      swig_obj = obj0;
      Py_XINCREF(swig_obj);
    } else {
      meep::abort("Expected a meep.source.SourceTime or a meep.src_time\n");
    }
    
    tmp_res = SWIG_ConvertPtr(swig_obj, &tmp_ptr, SWIGTYPE_p_meep__src_time, 0);
    Py_XDECREF(swig_obj);
    
    if(!SWIG_IsOK(tmp_res)) {
      SWIG_exception_fail(SWIG_ArgError(tmp_res), "Couldn't convert Python object to meep::src_time");
    }
    arg1 = reinterpret_cast<meep::src_time *>(tmp_ptr);
    
  }
  {
    PyObject *swig_obj = NULL;
    void *tmp_ptr = 0;
    int tmp_res = 0;
    
    if(PyObject_IsInstance(obj1, py_source_time_object())) {
      swig_obj = PyObject_GetAttrString(obj1, "swigobj");
    } else if(PyObject_IsInstance(obj1, py_meep_src_time_object())) {
      swig_obj = obj1;
      Py_XINCREF(swig_obj);
    } else {
      meep::abort("Expected a meep.source.SourceTime or a meep.src_time\n");
    }
    
    tmp_res = SWIG_ConvertPtr(swig_obj, &tmp_ptr, SWIGTYPE_p_meep__src_time, 0);
    Py_XDECREF(swig_obj);
    
    if(!SWIG_IsOK(tmp_res)) {
      SWIG_exception_fail(SWIG_ArgError(tmp_res), "Couldn't convert Python object to meep::src_time");
    }
    arg2 = reinterpret_cast<meep::src_time *>(tmp_ptr);
    
  }
  {
    try {
      result = (bool)meep::src_times_equal((meep::src_time const &)*arg1,(meep::src_time const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_gaussian_src_time__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::gaussian_src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_gaussian_src_time", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_gaussian_src_time" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_gaussian_src_time" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_gaussian_src_time" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      result = (meep::gaussian_src_time *)new meep::gaussian_src_time(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__gaussian_src_time, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_gaussian_src_time__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::gaussian_src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_gaussian_src_time", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_gaussian_src_time" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_gaussian_src_time" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = (meep::gaussian_src_time *)new meep::gaussian_src_time(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__gaussian_src_time, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_gaussian_src_time__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::gaussian_src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_gaussian_src_time", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_gaussian_src_time" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_gaussian_src_time" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_gaussian_src_time" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_gaussian_src_time" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  {
    try {
      result = (meep::gaussian_src_time *)new meep::gaussian_src_time(arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__gaussian_src_time, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_gaussian_src_time(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_gaussian_src_time__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new_gaussian_src_time__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_new_gaussian_src_time__SWIG_2(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_gaussian_src_time'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::gaussian_src_time::gaussian_src_time(double,double,double)\n"
    "    meep::gaussian_src_time::gaussian_src_time(double,double)\n"
    "    meep::gaussian_src_time::gaussian_src_time(double,double,double,double)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_gaussian_src_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gaussian_src_time *arg1 = (meep::gaussian_src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_gaussian_src_time", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gaussian_src_time, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_gaussian_src_time" "', argument " "1"" of type '" "meep::gaussian_src_time *""'"); 
  }
  arg1 = reinterpret_cast< meep::gaussian_src_time * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_gaussian_src_time_dipole(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gaussian_src_time *arg1 = (meep::gaussian_src_time *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "gaussian_src_time_dipole", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gaussian_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gaussian_src_time_dipole" "', argument " "1"" of type '" "meep::gaussian_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::gaussian_src_time * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gaussian_src_time_dipole" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = ((meep::gaussian_src_time const *)arg1)->dipole(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_gaussian_src_time_last_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gaussian_src_time *arg1 = (meep::gaussian_src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "gaussian_src_time_last_time", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gaussian_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gaussian_src_time_last_time" "', argument " "1"" of type '" "meep::gaussian_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::gaussian_src_time * >(argp1);
  {
    try {
      result = (double)((meep::gaussian_src_time const *)arg1)->last_time();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_gaussian_src_time_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gaussian_src_time *arg1 = (meep::gaussian_src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "gaussian_src_time_clone", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gaussian_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gaussian_src_time_clone" "', argument " "1"" of type '" "meep::gaussian_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::gaussian_src_time * >(argp1);
  {
    try {
      result = (meep::src_time *)((meep::gaussian_src_time const *)arg1)->clone();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__src_time, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_gaussian_src_time_is_equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gaussian_src_time *arg1 = (meep::gaussian_src_time *) 0 ;
  meep::src_time *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "gaussian_src_time_is_equal", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gaussian_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gaussian_src_time_is_equal" "', argument " "1"" of type '" "meep::gaussian_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::gaussian_src_time * >(argp1);
  {
    PyObject *swig_obj = NULL;
    void *tmp_ptr = 0;
    int tmp_res = 0;
    
    if(PyObject_IsInstance(obj1, py_source_time_object())) {
      swig_obj = PyObject_GetAttrString(obj1, "swigobj");
    } else if(PyObject_IsInstance(obj1, py_meep_src_time_object())) {
      swig_obj = obj1;
      Py_XINCREF(swig_obj);
    } else {
      meep::abort("Expected a meep.source.SourceTime or a meep.src_time\n");
    }
    
    tmp_res = SWIG_ConvertPtr(swig_obj, &tmp_ptr, SWIGTYPE_p_meep__src_time, 0);
    Py_XDECREF(swig_obj);
    
    if(!SWIG_IsOK(tmp_res)) {
      SWIG_exception_fail(SWIG_ArgError(tmp_res), "Couldn't convert Python object to meep::src_time");
    }
    arg2 = reinterpret_cast<meep::src_time *>(tmp_ptr);
    
  }
  {
    try {
      result = (bool)((meep::gaussian_src_time const *)arg1)->is_equal((meep::src_time const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_gaussian_src_time_frequency(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gaussian_src_time *arg1 = (meep::gaussian_src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "gaussian_src_time_frequency", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gaussian_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gaussian_src_time_frequency" "', argument " "1"" of type '" "meep::gaussian_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::gaussian_src_time * >(argp1);
  {
    try {
      result = ((meep::gaussian_src_time const *)arg1)->frequency();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_gaussian_src_time_get_fwidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gaussian_src_time *arg1 = (meep::gaussian_src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "gaussian_src_time_get_fwidth", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gaussian_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gaussian_src_time_get_fwidth" "', argument " "1"" of type '" "meep::gaussian_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::gaussian_src_time * >(argp1);
  {
    try {
      result = (double)((meep::gaussian_src_time const *)arg1)->get_fwidth();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_gaussian_src_time_set_fwidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gaussian_src_time *arg1 = (meep::gaussian_src_time *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "gaussian_src_time_set_fwidth", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gaussian_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gaussian_src_time_set_fwidth" "', argument " "1"" of type '" "meep::gaussian_src_time *""'"); 
  }
  arg1 = reinterpret_cast< meep::gaussian_src_time * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gaussian_src_time_set_fwidth" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      (arg1)->set_fwidth(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_gaussian_src_time_set_frequency(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gaussian_src_time *arg1 = (meep::gaussian_src_time *) 0 ;
  std::complex< double > arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::complex< double > val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "gaussian_src_time_set_frequency", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gaussian_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gaussian_src_time_set_frequency" "', argument " "1"" of type '" "meep::gaussian_src_time *""'"); 
  }
  arg1 = reinterpret_cast< meep::gaussian_src_time * >(argp1);
  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gaussian_src_time_set_frequency" "', argument " "2"" of type '" "std::complex< double >""'");
  } 
  arg2 = static_cast< std::complex< double > >(val2);
  {
    try {
      (arg1)->set_frequency(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_gaussian_src_time_fourier_transform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gaussian_src_time *arg1 = (meep::gaussian_src_time *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "gaussian_src_time_fourier_transform", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gaussian_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gaussian_src_time_fourier_transform" "', argument " "1"" of type '" "meep::gaussian_src_time *""'"); 
  }
  arg1 = reinterpret_cast< meep::gaussian_src_time * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gaussian_src_time_fourier_transform" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = (arg1)->fourier_transform(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *gaussian_src_time_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__gaussian_src_time, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *gaussian_src_time_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_continuous_src_time__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< double > arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  std::complex< double > val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  meep::continuous_src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_continuous_src_time", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  ecode1 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_continuous_src_time" "', argument " "1"" of type '" "std::complex< double >""'");
  } 
  arg1 = static_cast< std::complex< double > >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_continuous_src_time" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_continuous_src_time" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_continuous_src_time" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_continuous_src_time" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      result = (meep::continuous_src_time *)new meep::continuous_src_time(arg1,arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__continuous_src_time, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_continuous_src_time__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< double > arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  std::complex< double > val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::continuous_src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_continuous_src_time", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  ecode1 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_continuous_src_time" "', argument " "1"" of type '" "std::complex< double >""'");
  } 
  arg1 = static_cast< std::complex< double > >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_continuous_src_time" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_continuous_src_time" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_continuous_src_time" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  {
    try {
      result = (meep::continuous_src_time *)new meep::continuous_src_time(arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__continuous_src_time, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_continuous_src_time__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< double > arg1 ;
  double arg2 ;
  double arg3 ;
  std::complex< double > val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::continuous_src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_continuous_src_time", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_continuous_src_time" "', argument " "1"" of type '" "std::complex< double >""'");
  } 
  arg1 = static_cast< std::complex< double > >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_continuous_src_time" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_continuous_src_time" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      result = (meep::continuous_src_time *)new meep::continuous_src_time(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__continuous_src_time, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_continuous_src_time__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< double > arg1 ;
  double arg2 ;
  std::complex< double > val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::continuous_src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_continuous_src_time", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_continuous_src_time" "', argument " "1"" of type '" "std::complex< double >""'");
  } 
  arg1 = static_cast< std::complex< double > >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_continuous_src_time" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = (meep::continuous_src_time *)new meep::continuous_src_time(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__continuous_src_time, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_continuous_src_time__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< double > arg1 ;
  std::complex< double > val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::continuous_src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_continuous_src_time", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_continuous_src_time" "', argument " "1"" of type '" "std::complex< double >""'");
  } 
  arg1 = static_cast< std::complex< double > >(val1);
  {
    try {
      result = (meep::continuous_src_time *)new meep::continuous_src_time(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__continuous_src_time, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_continuous_src_time(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_continuous_src_time__SWIG_4(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_continuous_src_time__SWIG_3(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new_continuous_src_time__SWIG_2(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_new_continuous_src_time__SWIG_1(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_new_continuous_src_time__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_continuous_src_time'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::continuous_src_time::continuous_src_time(std::complex< double >,double,double,double,double)\n"
    "    meep::continuous_src_time::continuous_src_time(std::complex< double >,double,double,double)\n"
    "    meep::continuous_src_time::continuous_src_time(std::complex< double >,double,double)\n"
    "    meep::continuous_src_time::continuous_src_time(std::complex< double >,double)\n"
    "    meep::continuous_src_time::continuous_src_time(std::complex< double >)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_continuous_src_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::continuous_src_time *arg1 = (meep::continuous_src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_continuous_src_time", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__continuous_src_time, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_continuous_src_time" "', argument " "1"" of type '" "meep::continuous_src_time *""'"); 
  }
  arg1 = reinterpret_cast< meep::continuous_src_time * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_continuous_src_time_dipole(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::continuous_src_time *arg1 = (meep::continuous_src_time *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "continuous_src_time_dipole", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__continuous_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "continuous_src_time_dipole" "', argument " "1"" of type '" "meep::continuous_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::continuous_src_time * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "continuous_src_time_dipole" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = ((meep::continuous_src_time const *)arg1)->dipole(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_continuous_src_time_last_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::continuous_src_time *arg1 = (meep::continuous_src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "continuous_src_time_last_time", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__continuous_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "continuous_src_time_last_time" "', argument " "1"" of type '" "meep::continuous_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::continuous_src_time * >(argp1);
  {
    try {
      result = (double)((meep::continuous_src_time const *)arg1)->last_time();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_continuous_src_time_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::continuous_src_time *arg1 = (meep::continuous_src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "continuous_src_time_clone", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__continuous_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "continuous_src_time_clone" "', argument " "1"" of type '" "meep::continuous_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::continuous_src_time * >(argp1);
  {
    try {
      result = (meep::src_time *)((meep::continuous_src_time const *)arg1)->clone();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__src_time, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_continuous_src_time_is_equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::continuous_src_time *arg1 = (meep::continuous_src_time *) 0 ;
  meep::src_time *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "continuous_src_time_is_equal", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__continuous_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "continuous_src_time_is_equal" "', argument " "1"" of type '" "meep::continuous_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::continuous_src_time * >(argp1);
  {
    PyObject *swig_obj = NULL;
    void *tmp_ptr = 0;
    int tmp_res = 0;
    
    if(PyObject_IsInstance(obj1, py_source_time_object())) {
      swig_obj = PyObject_GetAttrString(obj1, "swigobj");
    } else if(PyObject_IsInstance(obj1, py_meep_src_time_object())) {
      swig_obj = obj1;
      Py_XINCREF(swig_obj);
    } else {
      meep::abort("Expected a meep.source.SourceTime or a meep.src_time\n");
    }
    
    tmp_res = SWIG_ConvertPtr(swig_obj, &tmp_ptr, SWIGTYPE_p_meep__src_time, 0);
    Py_XDECREF(swig_obj);
    
    if(!SWIG_IsOK(tmp_res)) {
      SWIG_exception_fail(SWIG_ArgError(tmp_res), "Couldn't convert Python object to meep::src_time");
    }
    arg2 = reinterpret_cast<meep::src_time *>(tmp_ptr);
    
  }
  {
    try {
      result = (bool)((meep::continuous_src_time const *)arg1)->is_equal((meep::src_time const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_continuous_src_time_frequency(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::continuous_src_time *arg1 = (meep::continuous_src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "continuous_src_time_frequency", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__continuous_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "continuous_src_time_frequency" "', argument " "1"" of type '" "meep::continuous_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::continuous_src_time * >(argp1);
  {
    try {
      result = ((meep::continuous_src_time const *)arg1)->frequency();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_continuous_src_time_get_fwidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::continuous_src_time *arg1 = (meep::continuous_src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "continuous_src_time_get_fwidth", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__continuous_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "continuous_src_time_get_fwidth" "', argument " "1"" of type '" "meep::continuous_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::continuous_src_time * >(argp1);
  {
    try {
      result = (double)((meep::continuous_src_time const *)arg1)->get_fwidth();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_continuous_src_time_set_frequency(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::continuous_src_time *arg1 = (meep::continuous_src_time *) 0 ;
  std::complex< double > arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::complex< double > val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "continuous_src_time_set_frequency", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__continuous_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "continuous_src_time_set_frequency" "', argument " "1"" of type '" "meep::continuous_src_time *""'"); 
  }
  arg1 = reinterpret_cast< meep::continuous_src_time * >(argp1);
  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "continuous_src_time_set_frequency" "', argument " "2"" of type '" "std::complex< double >""'");
  } 
  arg2 = static_cast< std::complex< double > >(val2);
  {
    try {
      (arg1)->set_frequency(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *continuous_src_time_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__continuous_src_time, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *continuous_src_time_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_custom_src_time__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< double > (*arg1)(double,void *) = (std::complex< double > (*)(double,void *)) 0 ;
  void *arg2 = (void *) 0 ;
  double arg3 ;
  double arg4 ;
  std::complex< double > arg5 ;
  double arg6 ;
  int res2 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  std::complex< double > val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  meep::custom_src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_custom_src_time", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  {
    int res = SWIG_ConvertFunctionPtr(obj0, (void**)(&arg1), SWIGTYPE_p_f_double_p_void__std__complexT_double_t);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "new_custom_src_time" "', argument " "1"" of type '" "std::complex< double > (*)(double,void *)""'"); 
    }
  }
  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_custom_src_time" "', argument " "2"" of type '" "void *""'"); 
  }
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_custom_src_time" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_custom_src_time" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_custom_src_time" "', argument " "5"" of type '" "std::complex< double >""'");
  } 
  arg5 = static_cast< std::complex< double > >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_custom_src_time" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  {
    try {
      result = (meep::custom_src_time *)new meep::custom_src_time(arg1,arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__custom_src_time, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_custom_src_time__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< double > (*arg1)(double,void *) = (std::complex< double > (*)(double,void *)) 0 ;
  void *arg2 = (void *) 0 ;
  double arg3 ;
  double arg4 ;
  std::complex< double > arg5 ;
  int res2 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  std::complex< double > val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  meep::custom_src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_custom_src_time", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  {
    int res = SWIG_ConvertFunctionPtr(obj0, (void**)(&arg1), SWIGTYPE_p_f_double_p_void__std__complexT_double_t);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "new_custom_src_time" "', argument " "1"" of type '" "std::complex< double > (*)(double,void *)""'"); 
    }
  }
  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_custom_src_time" "', argument " "2"" of type '" "void *""'"); 
  }
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_custom_src_time" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_custom_src_time" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_custom_src_time" "', argument " "5"" of type '" "std::complex< double >""'");
  } 
  arg5 = static_cast< std::complex< double > >(val5);
  {
    try {
      result = (meep::custom_src_time *)new meep::custom_src_time(arg1,arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__custom_src_time, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_custom_src_time__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< double > (*arg1)(double,void *) = (std::complex< double > (*)(double,void *)) 0 ;
  void *arg2 = (void *) 0 ;
  double arg3 ;
  double arg4 ;
  int res2 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::custom_src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_custom_src_time", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  {
    int res = SWIG_ConvertFunctionPtr(obj0, (void**)(&arg1), SWIGTYPE_p_f_double_p_void__std__complexT_double_t);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "new_custom_src_time" "', argument " "1"" of type '" "std::complex< double > (*)(double,void *)""'"); 
    }
  }
  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_custom_src_time" "', argument " "2"" of type '" "void *""'"); 
  }
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_custom_src_time" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_custom_src_time" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  {
    try {
      result = (meep::custom_src_time *)new meep::custom_src_time(arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__custom_src_time, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_custom_src_time__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< double > (*arg1)(double,void *) = (std::complex< double > (*)(double,void *)) 0 ;
  void *arg2 = (void *) 0 ;
  double arg3 ;
  int res2 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::custom_src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_custom_src_time", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  {
    int res = SWIG_ConvertFunctionPtr(obj0, (void**)(&arg1), SWIGTYPE_p_f_double_p_void__std__complexT_double_t);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "new_custom_src_time" "', argument " "1"" of type '" "std::complex< double > (*)(double,void *)""'"); 
    }
  }
  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_custom_src_time" "', argument " "2"" of type '" "void *""'"); 
  }
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_custom_src_time" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      result = (meep::custom_src_time *)new meep::custom_src_time(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__custom_src_time, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_custom_src_time__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< double > (*arg1)(double,void *) = (std::complex< double > (*)(double,void *)) 0 ;
  void *arg2 = (void *) 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::custom_src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_custom_src_time", 2, 2, &obj0, &obj1)) SWIG_fail;
  {
    int res = SWIG_ConvertFunctionPtr(obj0, (void**)(&arg1), SWIGTYPE_p_f_double_p_void__std__complexT_double_t);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "new_custom_src_time" "', argument " "1"" of type '" "std::complex< double > (*)(double,void *)""'"); 
    }
  }
  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_custom_src_time" "', argument " "2"" of type '" "void *""'"); 
  }
  {
    try {
      result = (meep::custom_src_time *)new meep::custom_src_time(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__custom_src_time, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_custom_src_time(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[7] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *ptr = 0;
    int res = SWIG_ConvertFunctionPtr(argv[0], &ptr, SWIGTYPE_p_f_double_p_void__std__complexT_double_t);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *ptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &ptr, 0, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_new_custom_src_time__SWIG_4(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *ptr = 0;
    int res = SWIG_ConvertFunctionPtr(argv[0], &ptr, SWIGTYPE_p_f_double_p_void__std__complexT_double_t);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *ptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &ptr, 0, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new_custom_src_time__SWIG_3(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *ptr = 0;
    int res = SWIG_ConvertFunctionPtr(argv[0], &ptr, SWIGTYPE_p_f_double_p_void__std__complexT_double_t);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *ptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &ptr, 0, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_new_custom_src_time__SWIG_2(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *ptr = 0;
    int res = SWIG_ConvertFunctionPtr(argv[0], &ptr, SWIGTYPE_p_f_double_p_void__std__complexT_double_t);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *ptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &ptr, 0, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_new_custom_src_time__SWIG_1(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *ptr = 0;
    int res = SWIG_ConvertFunctionPtr(argv[0], &ptr, SWIGTYPE_p_f_double_p_void__std__complexT_double_t);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *ptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &ptr, 0, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_new_custom_src_time__SWIG_0(self, args);
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_custom_src_time'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::custom_src_time::custom_src_time(std::complex< double > (*)(double,void *),void *,double,double,std::complex< double >,double)\n"
    "    meep::custom_src_time::custom_src_time(std::complex< double > (*)(double,void *),void *,double,double,std::complex< double >)\n"
    "    meep::custom_src_time::custom_src_time(std::complex< double > (*)(double,void *),void *,double,double)\n"
    "    meep::custom_src_time::custom_src_time(std::complex< double > (*)(double,void *),void *,double)\n"
    "    meep::custom_src_time::custom_src_time(std::complex< double > (*)(double,void *),void *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_custom_src_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::custom_src_time *arg1 = (meep::custom_src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_custom_src_time", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__custom_src_time, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_custom_src_time" "', argument " "1"" of type '" "meep::custom_src_time *""'"); 
  }
  arg1 = reinterpret_cast< meep::custom_src_time * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_custom_src_time_current(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::custom_src_time *arg1 = (meep::custom_src_time *) 0 ;
  double arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "custom_src_time_current", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__custom_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "custom_src_time_current" "', argument " "1"" of type '" "meep::custom_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::custom_src_time * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "custom_src_time_current" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "custom_src_time_current" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      result = ((meep::custom_src_time const *)arg1)->current(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_custom_src_time_dipole(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::custom_src_time *arg1 = (meep::custom_src_time *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "custom_src_time_dipole", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__custom_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "custom_src_time_dipole" "', argument " "1"" of type '" "meep::custom_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::custom_src_time * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "custom_src_time_dipole" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = ((meep::custom_src_time const *)arg1)->dipole(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_custom_src_time_last_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::custom_src_time *arg1 = (meep::custom_src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "custom_src_time_last_time", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__custom_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "custom_src_time_last_time" "', argument " "1"" of type '" "meep::custom_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::custom_src_time * >(argp1);
  {
    try {
      result = (double)((meep::custom_src_time const *)arg1)->last_time();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_custom_src_time_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::custom_src_time *arg1 = (meep::custom_src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "custom_src_time_clone", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__custom_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "custom_src_time_clone" "', argument " "1"" of type '" "meep::custom_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::custom_src_time * >(argp1);
  {
    try {
      result = (meep::src_time *)((meep::custom_src_time const *)arg1)->clone();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__src_time, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_custom_src_time_is_equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::custom_src_time *arg1 = (meep::custom_src_time *) 0 ;
  meep::src_time *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "custom_src_time_is_equal", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__custom_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "custom_src_time_is_equal" "', argument " "1"" of type '" "meep::custom_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::custom_src_time * >(argp1);
  {
    PyObject *swig_obj = NULL;
    void *tmp_ptr = 0;
    int tmp_res = 0;
    
    if(PyObject_IsInstance(obj1, py_source_time_object())) {
      swig_obj = PyObject_GetAttrString(obj1, "swigobj");
    } else if(PyObject_IsInstance(obj1, py_meep_src_time_object())) {
      swig_obj = obj1;
      Py_XINCREF(swig_obj);
    } else {
      meep::abort("Expected a meep.source.SourceTime or a meep.src_time\n");
    }
    
    tmp_res = SWIG_ConvertPtr(swig_obj, &tmp_ptr, SWIGTYPE_p_meep__src_time, 0);
    Py_XDECREF(swig_obj);
    
    if(!SWIG_IsOK(tmp_res)) {
      SWIG_exception_fail(SWIG_ArgError(tmp_res), "Couldn't convert Python object to meep::src_time");
    }
    arg2 = reinterpret_cast<meep::src_time *>(tmp_ptr);
    
  }
  {
    try {
      result = (bool)((meep::custom_src_time const *)arg1)->is_equal((meep::src_time const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_custom_src_time_frequency(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::custom_src_time *arg1 = (meep::custom_src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "custom_src_time_frequency", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__custom_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "custom_src_time_frequency" "', argument " "1"" of type '" "meep::custom_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::custom_src_time * >(argp1);
  {
    try {
      result = ((meep::custom_src_time const *)arg1)->frequency();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_custom_src_time_set_frequency(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::custom_src_time *arg1 = (meep::custom_src_time *) 0 ;
  std::complex< double > arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::complex< double > val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "custom_src_time_set_frequency", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__custom_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "custom_src_time_set_frequency" "', argument " "1"" of type '" "meep::custom_src_time *""'"); 
  }
  arg1 = reinterpret_cast< meep::custom_src_time * >(argp1);
  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "custom_src_time_set_frequency" "', argument " "2"" of type '" "std::complex< double >""'");
  } 
  arg2 = static_cast< std::complex< double > >(val2);
  {
    try {
      (arg1)->set_frequency(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_custom_src_time_get_fwidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::custom_src_time *arg1 = (meep::custom_src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "custom_src_time_get_fwidth", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__custom_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "custom_src_time_get_fwidth" "', argument " "1"" of type '" "meep::custom_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::custom_src_time * >(argp1);
  {
    try {
      result = (double)((meep::custom_src_time const *)arg1)->get_fwidth();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_custom_src_time_set_fwidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::custom_src_time *arg1 = (meep::custom_src_time *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "custom_src_time_set_fwidth", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__custom_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "custom_src_time_set_fwidth" "', argument " "1"" of type '" "meep::custom_src_time *""'"); 
  }
  arg1 = reinterpret_cast< meep::custom_src_time * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "custom_src_time_set_fwidth" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      (arg1)->set_fwidth(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *custom_src_time_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__custom_src_time, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *custom_src_time_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_monitor_point(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::monitor_point *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_monitor_point", 0, 0)) SWIG_fail;
  {
    try {
      result = (meep::monitor_point *)new meep::monitor_point();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__monitor_point, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_monitor_point(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::monitor_point *arg1 = (meep::monitor_point *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_monitor_point", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__monitor_point, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_monitor_point" "', argument " "1"" of type '" "meep::monitor_point *""'"); 
  }
  arg1 = reinterpret_cast< meep::monitor_point * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_monitor_point_loc_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::monitor_point *arg1 = (meep::monitor_point *) 0 ;
  meep::vec *arg2 = (meep::vec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "monitor_point_loc_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__monitor_point, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "monitor_point_loc_set" "', argument " "1"" of type '" "meep::monitor_point *""'"); 
  }
  arg1 = reinterpret_cast< meep::monitor_point * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "monitor_point_loc_set" "', argument " "2"" of type '" "meep::vec *""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  if (arg1) (arg1)->loc = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_monitor_point_loc_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::monitor_point *arg1 = (meep::monitor_point *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::vec *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "monitor_point_loc_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__monitor_point, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "monitor_point_loc_get" "', argument " "1"" of type '" "meep::monitor_point *""'"); 
  }
  arg1 = reinterpret_cast< meep::monitor_point * >(argp1);
  result = (meep::vec *)& ((arg1)->loc);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__vec, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_monitor_point_t_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::monitor_point *arg1 = (meep::monitor_point *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "monitor_point_t_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__monitor_point, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "monitor_point_t_set" "', argument " "1"" of type '" "meep::monitor_point *""'"); 
  }
  arg1 = reinterpret_cast< meep::monitor_point * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "monitor_point_t_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->t = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_monitor_point_t_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::monitor_point *arg1 = (meep::monitor_point *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "monitor_point_t_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__monitor_point, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "monitor_point_t_get" "', argument " "1"" of type '" "meep::monitor_point *""'"); 
  }
  arg1 = reinterpret_cast< meep::monitor_point * >(argp1);
  result = (double) ((arg1)->t);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_monitor_point_f_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::monitor_point *arg1 = (meep::monitor_point *) 0 ;
  std::complex< double > *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "monitor_point_f_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__monitor_point, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "monitor_point_f_set" "', argument " "1"" of type '" "meep::monitor_point *""'"); 
  }
  arg1 = reinterpret_cast< meep::monitor_point * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "monitor_point_f_set" "', argument " "2"" of type '" "std::complex< double > [meep::NUM_FIELD_COMPONENTS]""'"); 
  } 
  arg2 = reinterpret_cast< std::complex< double > * >(argp2);
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)meep::NUM_FIELD_COMPONENTS; ++ii) *(std::complex< double > *)&arg1->f[ii] = *((std::complex< double > *)arg2 + ii);
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""f""' of type '""std::complex< double > [meep::NUM_FIELD_COMPONENTS]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_monitor_point_f_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::monitor_point *arg1 = (meep::monitor_point *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::complex< double > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "monitor_point_f_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__monitor_point, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "monitor_point_f_get" "', argument " "1"" of type '" "meep::monitor_point *""'"); 
  }
  arg1 = reinterpret_cast< meep::monitor_point * >(argp1);
  result = (std::complex< double > *)(std::complex< double > *) ((arg1)->f);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_monitor_point_next_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::monitor_point *arg1 = (meep::monitor_point *) 0 ;
  meep::monitor_point *arg2 = (meep::monitor_point *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "monitor_point_next_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__monitor_point, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "monitor_point_next_set" "', argument " "1"" of type '" "meep::monitor_point *""'"); 
  }
  arg1 = reinterpret_cast< meep::monitor_point * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__monitor_point, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "monitor_point_next_set" "', argument " "2"" of type '" "meep::monitor_point *""'"); 
  }
  arg2 = reinterpret_cast< meep::monitor_point * >(argp2);
  if (arg1) (arg1)->next = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_monitor_point_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::monitor_point *arg1 = (meep::monitor_point *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::monitor_point *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "monitor_point_next_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__monitor_point, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "monitor_point_next_get" "', argument " "1"" of type '" "meep::monitor_point *""'"); 
  }
  arg1 = reinterpret_cast< meep::monitor_point * >(argp1);
  result = (meep::monitor_point *) ((arg1)->next);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__monitor_point, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_monitor_point_get_component(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::monitor_point *arg1 = (meep::monitor_point *) 0 ;
  meep::component arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "monitor_point_get_component", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__monitor_point, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "monitor_point_get_component" "', argument " "1"" of type '" "meep::monitor_point *""'"); 
  }
  arg1 = reinterpret_cast< meep::monitor_point * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    try {
      result = (arg1)->get_component(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_monitor_point_poynting_in_direction__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::monitor_point *arg1 = (meep::monitor_point *) 0 ;
  meep::direction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "monitor_point_poynting_in_direction", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__monitor_point, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "monitor_point_poynting_in_direction" "', argument " "1"" of type '" "meep::monitor_point *""'"); 
  }
  arg1 = reinterpret_cast< meep::monitor_point * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "monitor_point_poynting_in_direction" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  {
    try {
      result = (double)(arg1)->poynting_in_direction(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_monitor_point_poynting_in_direction__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::monitor_point *arg1 = (meep::monitor_point *) 0 ;
  meep::vec arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "monitor_point_poynting_in_direction", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__monitor_point, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "monitor_point_poynting_in_direction" "', argument " "1"" of type '" "meep::monitor_point *""'"); 
  }
  arg1 = reinterpret_cast< meep::monitor_point * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "monitor_point_poynting_in_direction" "', argument " "2"" of type '" "meep::vec""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "monitor_point_poynting_in_direction" "', argument " "2"" of type '" "meep::vec""'");
    } else {
      meep::vec * temp = reinterpret_cast< meep::vec * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    try {
      result = (double)(arg1)->poynting_in_direction(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_monitor_point_poynting_in_direction(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__monitor_point, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_monitor_point_poynting_in_direction__SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__monitor_point, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_monitor_point_poynting_in_direction__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'monitor_point_poynting_in_direction'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::monitor_point::poynting_in_direction(meep::direction)\n"
    "    meep::monitor_point::poynting_in_direction(meep::vec)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_monitor_point_fourier_transform__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::monitor_point *arg1 = (meep::monitor_point *) 0 ;
  meep::component arg2 ;
  std::complex< double > **arg3 = (std::complex< double > **) 0 ;
  std::complex< double > **arg4 = (std::complex< double > **) 0 ;
  int *arg5 = (int *) 0 ;
  double arg6 ;
  double arg7 ;
  int arg8 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  int val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "monitor_point_fourier_transform", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__monitor_point, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "monitor_point_fourier_transform" "', argument " "1"" of type '" "meep::monitor_point *""'"); 
  }
  arg1 = reinterpret_cast< meep::monitor_point * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "monitor_point_fourier_transform" "', argument " "3"" of type '" "std::complex< double > **""'"); 
  }
  arg3 = reinterpret_cast< std::complex< double > ** >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "monitor_point_fourier_transform" "', argument " "4"" of type '" "std::complex< double > **""'"); 
  }
  arg4 = reinterpret_cast< std::complex< double > ** >(argp4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "monitor_point_fourier_transform" "', argument " "5"" of type '" "int *""'"); 
  }
  arg5 = reinterpret_cast< int * >(argp5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "monitor_point_fourier_transform" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_double(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "monitor_point_fourier_transform" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  ecode8 = SWIG_AsVal_int(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "monitor_point_fourier_transform" "', argument " "8"" of type '" "int""'");
  } 
  arg8 = static_cast< int >(val8);
  {
    try {
      (arg1)->fourier_transform(arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_monitor_point_fourier_transform__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::monitor_point *arg1 = (meep::monitor_point *) 0 ;
  meep::component arg2 ;
  std::complex< double > **arg3 = (std::complex< double > **) 0 ;
  std::complex< double > **arg4 = (std::complex< double > **) 0 ;
  int *arg5 = (int *) 0 ;
  double arg6 ;
  double arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "monitor_point_fourier_transform", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__monitor_point, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "monitor_point_fourier_transform" "', argument " "1"" of type '" "meep::monitor_point *""'"); 
  }
  arg1 = reinterpret_cast< meep::monitor_point * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "monitor_point_fourier_transform" "', argument " "3"" of type '" "std::complex< double > **""'"); 
  }
  arg3 = reinterpret_cast< std::complex< double > ** >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "monitor_point_fourier_transform" "', argument " "4"" of type '" "std::complex< double > **""'"); 
  }
  arg4 = reinterpret_cast< std::complex< double > ** >(argp4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "monitor_point_fourier_transform" "', argument " "5"" of type '" "int *""'"); 
  }
  arg5 = reinterpret_cast< int * >(argp5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "monitor_point_fourier_transform" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_double(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "monitor_point_fourier_transform" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  {
    try {
      (arg1)->fourier_transform(arg2,arg3,arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_monitor_point_fourier_transform__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::monitor_point *arg1 = (meep::monitor_point *) 0 ;
  meep::component arg2 ;
  std::complex< double > **arg3 = (std::complex< double > **) 0 ;
  std::complex< double > **arg4 = (std::complex< double > **) 0 ;
  int *arg5 = (int *) 0 ;
  double arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "monitor_point_fourier_transform", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__monitor_point, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "monitor_point_fourier_transform" "', argument " "1"" of type '" "meep::monitor_point *""'"); 
  }
  arg1 = reinterpret_cast< meep::monitor_point * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "monitor_point_fourier_transform" "', argument " "3"" of type '" "std::complex< double > **""'"); 
  }
  arg3 = reinterpret_cast< std::complex< double > ** >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "monitor_point_fourier_transform" "', argument " "4"" of type '" "std::complex< double > **""'"); 
  }
  arg4 = reinterpret_cast< std::complex< double > ** >(argp4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "monitor_point_fourier_transform" "', argument " "5"" of type '" "int *""'"); 
  }
  arg5 = reinterpret_cast< int * >(argp5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "monitor_point_fourier_transform" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  {
    try {
      (arg1)->fourier_transform(arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_monitor_point_fourier_transform__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::monitor_point *arg1 = (meep::monitor_point *) 0 ;
  meep::component arg2 ;
  std::complex< double > **arg3 = (std::complex< double > **) 0 ;
  std::complex< double > **arg4 = (std::complex< double > **) 0 ;
  int *arg5 = (int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "monitor_point_fourier_transform", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__monitor_point, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "monitor_point_fourier_transform" "', argument " "1"" of type '" "meep::monitor_point *""'"); 
  }
  arg1 = reinterpret_cast< meep::monitor_point * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "monitor_point_fourier_transform" "', argument " "3"" of type '" "std::complex< double > **""'"); 
  }
  arg3 = reinterpret_cast< std::complex< double > ** >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "monitor_point_fourier_transform" "', argument " "4"" of type '" "std::complex< double > **""'"); 
  }
  arg4 = reinterpret_cast< std::complex< double > ** >(argp4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "monitor_point_fourier_transform" "', argument " "5"" of type '" "int *""'"); 
  }
  arg5 = reinterpret_cast< int * >(argp5);
  {
    try {
      (arg1)->fourier_transform(arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_monitor_point_fourier_transform(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[9] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 8) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__monitor_point, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_p_std__complexT_double_t, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_p_std__complexT_double_t, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_int, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_monitor_point_fourier_transform__SWIG_3(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__monitor_point, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_p_std__complexT_double_t, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_p_std__complexT_double_t, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_int, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_monitor_point_fourier_transform__SWIG_2(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__monitor_point, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_p_std__complexT_double_t, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_p_std__complexT_double_t, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_int, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_double(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_monitor_point_fourier_transform__SWIG_1(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__monitor_point, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_p_std__complexT_double_t, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_p_std__complexT_double_t, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_int, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_double(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_int(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    return _wrap_monitor_point_fourier_transform__SWIG_0(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'monitor_point_fourier_transform'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::monitor_point::fourier_transform(meep::component,std::complex< double > **,std::complex< double > **,int *,double,double,int)\n"
    "    meep::monitor_point::fourier_transform(meep::component,std::complex< double > **,std::complex< double > **,int *,double,double)\n"
    "    meep::monitor_point::fourier_transform(meep::component,std::complex< double > **,std::complex< double > **,int *,double)\n"
    "    meep::monitor_point::fourier_transform(meep::component,std::complex< double > **,std::complex< double > **,int *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_monitor_point_harminv(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::monitor_point *arg1 = (meep::monitor_point *) 0 ;
  meep::component arg2 ;
  std::complex< double > **arg3 = (std::complex< double > **) 0 ;
  std::complex< double > **arg4 = (std::complex< double > **) 0 ;
  int *arg5 = (int *) 0 ;
  double arg6 ;
  double arg7 ;
  int arg8 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  int val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "monitor_point_harminv", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__monitor_point, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "monitor_point_harminv" "', argument " "1"" of type '" "meep::monitor_point *""'"); 
  }
  arg1 = reinterpret_cast< meep::monitor_point * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "monitor_point_harminv" "', argument " "3"" of type '" "std::complex< double > **""'"); 
  }
  arg3 = reinterpret_cast< std::complex< double > ** >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "monitor_point_harminv" "', argument " "4"" of type '" "std::complex< double > **""'"); 
  }
  arg4 = reinterpret_cast< std::complex< double > ** >(argp4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "monitor_point_harminv" "', argument " "5"" of type '" "int *""'"); 
  }
  arg5 = reinterpret_cast< int * >(argp5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "monitor_point_harminv" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_double(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "monitor_point_harminv" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  ecode8 = SWIG_AsVal_int(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "monitor_point_harminv" "', argument " "8"" of type '" "int""'");
  } 
  arg8 = static_cast< int >(val8);
  {
    try {
      (arg1)->harminv(arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *monitor_point_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__monitor_point, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *monitor_point_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_dft_chunk(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ;
  meep::ivec arg2 ;
  meep::ivec arg3 ;
  meep::vec arg4 ;
  meep::vec arg5 ;
  meep::vec arg6 ;
  meep::vec arg7 ;
  double arg8 ;
  double arg9 ;
  meep::component arg10 ;
  bool arg11 ;
  std::complex< double > arg12 ;
  meep::ivec arg13 ;
  meep::symmetry *arg14 = 0 ;
  int arg15 ;
  void *arg16 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  void *argp5 ;
  int res5 = 0 ;
  void *argp6 ;
  int res6 = 0 ;
  void *argp7 ;
  int res7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  double val9 ;
  int ecode9 = 0 ;
  bool val11 ;
  int ecode11 = 0 ;
  std::complex< double > val12 ;
  int ecode12 = 0 ;
  void *argp13 ;
  int res13 = 0 ;
  void *argp14 = 0 ;
  int res14 = 0 ;
  int val15 ;
  int ecode15 = 0 ;
  int res16 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  PyObject * obj14 = 0 ;
  PyObject * obj15 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_dft_chunk", 16, 16, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13, &obj14, &obj15)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_dft_chunk" "', argument " "1"" of type '" "meep::fields_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields_chunk * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__ivec,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_dft_chunk" "', argument " "2"" of type '" "meep::ivec""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_chunk" "', argument " "2"" of type '" "meep::ivec""'");
    } else {
      meep::ivec * temp = reinterpret_cast< meep::ivec * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__ivec,  0  | 0);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_dft_chunk" "', argument " "3"" of type '" "meep::ivec""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_chunk" "', argument " "3"" of type '" "meep::ivec""'");
    } else {
      meep::ivec * temp = reinterpret_cast< meep::ivec * >(argp3);
      arg3 = *temp;
      if (SWIG_IsNewObj(res3)) delete temp;
    }
  }
  {
    res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__vec,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_dft_chunk" "', argument " "4"" of type '" "meep::vec""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_chunk" "', argument " "4"" of type '" "meep::vec""'");
    } else {
      meep::vec * temp = reinterpret_cast< meep::vec * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  {
    res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__vec,  0  | 0);
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_dft_chunk" "', argument " "5"" of type '" "meep::vec""'"); 
    }  
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_chunk" "', argument " "5"" of type '" "meep::vec""'");
    } else {
      meep::vec * temp = reinterpret_cast< meep::vec * >(argp5);
      arg5 = *temp;
      if (SWIG_IsNewObj(res5)) delete temp;
    }
  }
  {
    res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_meep__vec,  0  | 0);
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_dft_chunk" "', argument " "6"" of type '" "meep::vec""'"); 
    }  
    if (!argp6) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_chunk" "', argument " "6"" of type '" "meep::vec""'");
    } else {
      meep::vec * temp = reinterpret_cast< meep::vec * >(argp6);
      arg6 = *temp;
      if (SWIG_IsNewObj(res6)) delete temp;
    }
  }
  {
    res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_meep__vec,  0  | 0);
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_dft_chunk" "', argument " "7"" of type '" "meep::vec""'"); 
    }  
    if (!argp7) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_chunk" "', argument " "7"" of type '" "meep::vec""'");
    } else {
      meep::vec * temp = reinterpret_cast< meep::vec * >(argp7);
      arg7 = *temp;
      if (SWIG_IsNewObj(res7)) delete temp;
    }
  }
  ecode8 = SWIG_AsVal_double(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_dft_chunk" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  ecode9 = SWIG_AsVal_double(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_dft_chunk" "', argument " "9"" of type '" "double""'");
  } 
  arg9 = static_cast< double >(val9);
  {
    arg10 = static_cast<meep::component>(PyInteger_AsLong(obj9));
  }
  ecode11 = SWIG_AsVal_bool(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_dft_chunk" "', argument " "11"" of type '" "bool""'");
  } 
  arg11 = static_cast< bool >(val11);
  ecode12 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_dft_chunk" "', argument " "12"" of type '" "std::complex< double >""'");
  } 
  arg12 = static_cast< std::complex< double > >(val12);
  {
    res13 = SWIG_ConvertPtr(obj12, &argp13, SWIGTYPE_p_meep__ivec,  0  | 0);
    if (!SWIG_IsOK(res13)) {
      SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "new_dft_chunk" "', argument " "13"" of type '" "meep::ivec""'"); 
    }  
    if (!argp13) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_chunk" "', argument " "13"" of type '" "meep::ivec""'");
    } else {
      meep::ivec * temp = reinterpret_cast< meep::ivec * >(argp13);
      arg13 = *temp;
      if (SWIG_IsNewObj(res13)) delete temp;
    }
  }
  res14 = SWIG_ConvertPtr(obj13, &argp14, SWIGTYPE_p_meep__symmetry,  0  | 0);
  if (!SWIG_IsOK(res14)) {
    SWIG_exception_fail(SWIG_ArgError(res14), "in method '" "new_dft_chunk" "', argument " "14"" of type '" "meep::symmetry const &""'"); 
  }
  if (!argp14) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_chunk" "', argument " "14"" of type '" "meep::symmetry const &""'"); 
  }
  arg14 = reinterpret_cast< meep::symmetry * >(argp14);
  ecode15 = SWIG_AsVal_int(obj14, &val15);
  if (!SWIG_IsOK(ecode15)) {
    SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "new_dft_chunk" "', argument " "15"" of type '" "int""'");
  } 
  arg15 = static_cast< int >(val15);
  res16 = SWIG_ConvertPtr(obj15,SWIG_as_voidptrptr(&arg16), 0, 0);
  if (!SWIG_IsOK(res16)) {
    SWIG_exception_fail(SWIG_ArgError(res16), "in method '" "new_dft_chunk" "', argument " "16"" of type '" "void const *""'"); 
  }
  {
    try {
      result = (meep::dft_chunk *)new meep::dft_chunk(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,(meep::symmetry const &)*arg14,arg15,(void const *)arg16);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_dft_chunk(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_dft_chunk", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_dft_chunk" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_update_dft(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_update_dft", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_update_dft" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_chunk_update_dft" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      (arg1)->update_dft(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_norm2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::grid_volume arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_norm2", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_norm2" "', argument " "1"" of type '" "meep::dft_chunk const *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__grid_volume,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_chunk_norm2" "', argument " "2"" of type '" "meep::grid_volume""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_chunk_norm2" "', argument " "2"" of type '" "meep::grid_volume""'");
    } else {
      meep::grid_volume * temp = reinterpret_cast< meep::grid_volume * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    try {
      result = (double)((meep::dft_chunk const *)arg1)->norm2(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_maxomega(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_maxomega", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_maxomega" "', argument " "1"" of type '" "meep::dft_chunk const *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  {
    try {
      result = (double)((meep::dft_chunk const *)arg1)->maxomega();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_scale_dft(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  std::complex< double > arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::complex< double > val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_scale_dft", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_scale_dft" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_chunk_scale_dft" "', argument " "2"" of type '" "std::complex< double >""'");
  } 
  arg2 = static_cast< std::complex< double > >(val2);
  {
    try {
      (arg1)->scale_dft(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_process_dft_component(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  int arg2 ;
  meep::direction *arg3 = (meep::direction *) 0 ;
  meep::ivec arg4 ;
  meep::ivec arg5 ;
  int arg6 ;
  meep::h5file *arg7 = (meep::h5file *) 0 ;
  meep::realnum *arg8 = (meep::realnum *) 0 ;
  int arg9 ;
  std::complex< meep::realnum > *arg10 = (std::complex< meep::realnum > *) 0 ;
  void *arg11 = (void *) 0 ;
  void *arg12 = (void *) 0 ;
  int arg13 ;
  bool arg14 ;
  meep::fields *arg15 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  void *argp5 ;
  int res5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  int res11 ;
  int res12 ;
  int val13 ;
  int ecode13 = 0 ;
  bool val14 ;
  int ecode14 = 0 ;
  void *argp15 = 0 ;
  int res15 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  PyObject * obj14 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_process_dft_component", 15, 15, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13, &obj14)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_process_dft_component" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_chunk_process_dft_component" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__direction, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_chunk_process_dft_component" "', argument " "3"" of type '" "meep::direction *""'"); 
  }
  arg3 = reinterpret_cast< meep::direction * >(argp3);
  {
    res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__ivec,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dft_chunk_process_dft_component" "', argument " "4"" of type '" "meep::ivec""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_chunk_process_dft_component" "', argument " "4"" of type '" "meep::ivec""'");
    } else {
      meep::ivec * temp = reinterpret_cast< meep::ivec * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  {
    res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__ivec,  0  | 0);
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "dft_chunk_process_dft_component" "', argument " "5"" of type '" "meep::ivec""'"); 
    }  
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_chunk_process_dft_component" "', argument " "5"" of type '" "meep::ivec""'");
    } else {
      meep::ivec * temp = reinterpret_cast< meep::ivec * >(argp5);
      arg5 = *temp;
      if (SWIG_IsNewObj(res5)) delete temp;
    }
  }
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "dft_chunk_process_dft_component" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "dft_chunk_process_dft_component" "', argument " "7"" of type '" "meep::h5file *""'"); 
  }
  arg7 = reinterpret_cast< meep::h5file * >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "dft_chunk_process_dft_component" "', argument " "8"" of type '" "meep::realnum *""'"); 
  }
  arg8 = reinterpret_cast< meep::realnum * >(argp8);
  ecode9 = SWIG_AsVal_int(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "dft_chunk_process_dft_component" "', argument " "9"" of type '" "int""'");
  } 
  arg9 = static_cast< int >(val9);
  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "dft_chunk_process_dft_component" "', argument " "10"" of type '" "std::complex< meep::realnum > *""'"); 
  }
  arg10 = reinterpret_cast< std::complex< meep::realnum > * >(argp10);
  res11 = SWIG_ConvertPtr(obj10,SWIG_as_voidptrptr(&arg11), 0, 0);
  if (!SWIG_IsOK(res11)) {
    SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "dft_chunk_process_dft_component" "', argument " "11"" of type '" "void *""'"); 
  }
  res12 = SWIG_ConvertPtr(obj11,SWIG_as_voidptrptr(&arg12), 0, 0);
  if (!SWIG_IsOK(res12)) {
    SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "dft_chunk_process_dft_component" "', argument " "12"" of type '" "void *""'"); 
  }
  ecode13 = SWIG_AsVal_int(obj12, &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "dft_chunk_process_dft_component" "', argument " "13"" of type '" "int""'");
  } 
  arg13 = static_cast< int >(val13);
  ecode14 = SWIG_AsVal_bool(obj13, &val14);
  if (!SWIG_IsOK(ecode14)) {
    SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "dft_chunk_process_dft_component" "', argument " "14"" of type '" "bool""'");
  } 
  arg14 = static_cast< bool >(val14);
  res15 = SWIG_ConvertPtr(obj14, &argp15,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res15)) {
    SWIG_exception_fail(SWIG_ArgError(res15), "in method '" "dft_chunk_process_dft_component" "', argument " "15"" of type '" "meep::fields *""'"); 
  }
  arg15 = reinterpret_cast< meep::fields * >(argp15);
  {
    try {
      result = (arg1)->process_dft_component(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_get_decimation_factor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_get_decimation_factor", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_get_decimation_factor" "', argument " "1"" of type '" "meep::dft_chunk const *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  {
    try {
      result = (int)((meep::dft_chunk const *)arg1)->get_decimation_factor();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::dft_chunk *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk___isub__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk___isub__" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_chunk,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_chunk___isub__" "', argument " "2"" of type '" "meep::dft_chunk const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_chunk___isub__" "', argument " "2"" of type '" "meep::dft_chunk const &""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk * >(argp2);
  {
    try {
      (arg1)->operator -=((meep::dft_chunk const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_omega_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  std::vector< double,std::allocator< double > > *arg2 = (std::vector< double,std::allocator< double > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_omega_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_omega_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_chunk_omega_set" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > *""'"); 
  }
  arg2 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp2);
  if (arg1) (arg1)->omega = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_omega_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< double,std::allocator< double > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_omega_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_omega_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (std::vector< double,std::allocator< double > > *)& ((arg1)->omega);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_persist_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_persist_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_persist_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  ecode2 = SWIG_AsVal_bool(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_chunk_persist_set" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  if (arg1) (arg1)->persist = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_persist_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_persist_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_persist_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (bool) ((arg1)->persist);
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_c_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::component arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_c_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_c_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  if (arg1) (arg1)->c = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_c_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::component result;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_c_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_c_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (meep::component) ((arg1)->c);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_N_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_N_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_N_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_chunk_N_set" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  if (arg1) (arg1)->N = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_N_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  size_t result;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_N_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_N_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result =  ((arg1)->N);
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_dft_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  std::complex< meep::realnum > *arg2 = (std::complex< meep::realnum > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_dft_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_dft_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__complexT_double_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_chunk_dft_set" "', argument " "2"" of type '" "std::complex< meep::realnum > *""'"); 
  }
  arg2 = reinterpret_cast< std::complex< meep::realnum > * >(argp2);
  if (arg1) (arg1)->dft = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_dft_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::complex< meep::realnum > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_dft_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_dft_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (std::complex< meep::realnum > *) ((arg1)->dft);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_next_in_chunk_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_next_in_chunk_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_next_in_chunk_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__dft_chunk, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_chunk_next_in_chunk_set" "', argument " "2"" of type '" "meep::dft_chunk *""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk * >(argp2);
  if (arg1) (arg1)->next_in_chunk = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_next_in_chunk_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_next_in_chunk_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_next_in_chunk_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (meep::dft_chunk *) ((arg1)->next_in_chunk);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_next_in_dft_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_next_in_dft_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_next_in_dft_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__dft_chunk, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_chunk_next_in_dft_set" "', argument " "2"" of type '" "meep::dft_chunk *""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk * >(argp2);
  if (arg1) (arg1)->next_in_dft = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_next_in_dft_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_next_in_dft_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_next_in_dft_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (meep::dft_chunk *) ((arg1)->next_in_dft);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_stored_weight_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  std::complex< double > *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::complex< double > temp2 ;
  std::complex< double > val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_stored_weight_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_stored_weight_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_chunk_stored_weight_set" "', argument " "2"" of type '" "std::complex< double >""'");
  } 
  temp2 = static_cast< std::complex< double > >(val2);
  arg2 = &temp2;
  if (arg1) (arg1)->stored_weight = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_stored_weight_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::complex< double > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_stored_weight_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_stored_weight_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (std::complex< double > *) & ((arg1)->stored_weight);
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(*result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_include_dV_and_interp_weights_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_include_dV_and_interp_weights_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_include_dV_and_interp_weights_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  ecode2 = SWIG_AsVal_bool(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_chunk_include_dV_and_interp_weights_set" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  if (arg1) (arg1)->include_dV_and_interp_weights = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_include_dV_and_interp_weights_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_include_dV_and_interp_weights_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_include_dV_and_interp_weights_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (bool) ((arg1)->include_dV_and_interp_weights);
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_sqrt_dV_and_interp_weights_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_sqrt_dV_and_interp_weights_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_sqrt_dV_and_interp_weights_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  ecode2 = SWIG_AsVal_bool(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_chunk_sqrt_dV_and_interp_weights_set" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  if (arg1) (arg1)->sqrt_dV_and_interp_weights = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_sqrt_dV_and_interp_weights_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_sqrt_dV_and_interp_weights_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_sqrt_dV_and_interp_weights_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (bool) ((arg1)->sqrt_dV_and_interp_weights);
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_extra_weight_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  std::complex< double > *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::complex< double > temp2 ;
  std::complex< double > val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_extra_weight_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_extra_weight_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_chunk_extra_weight_set" "', argument " "2"" of type '" "std::complex< double >""'");
  } 
  temp2 = static_cast< std::complex< double > >(val2);
  arg2 = &temp2;
  if (arg1) (arg1)->extra_weight = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_extra_weight_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::complex< double > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_extra_weight_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_extra_weight_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (std::complex< double > *) & ((arg1)->extra_weight);
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(*result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_fc_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::fields_chunk *arg2 = (meep::fields_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_fc_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_fc_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__fields_chunk, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_chunk_fc_set" "', argument " "2"" of type '" "meep::fields_chunk *""'"); 
  }
  arg2 = reinterpret_cast< meep::fields_chunk * >(argp2);
  if (arg1) (arg1)->fc = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_fc_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::fields_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_fc_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_fc_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (meep::fields_chunk *) ((arg1)->fc);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__fields_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk__is_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::ivec *arg2 = (meep::ivec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk__is_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk__is_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_chunk__is_set" "', argument " "2"" of type '" "meep::ivec *""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  if (arg1) (arg1)->is = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk__is_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::ivec *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk__is_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk__is_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (meep::ivec *)& ((arg1)->is);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__ivec, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_ie_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::ivec *arg2 = (meep::ivec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_ie_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_ie_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_chunk_ie_set" "', argument " "2"" of type '" "meep::ivec *""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  if (arg1) (arg1)->ie = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_ie_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::ivec *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_ie_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_ie_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (meep::ivec *)& ((arg1)->ie);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__ivec, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_is_old_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::ivec *arg2 = (meep::ivec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_is_old_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_is_old_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_chunk_is_old_set" "', argument " "2"" of type '" "meep::ivec *""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  if (arg1) (arg1)->is_old = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_is_old_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::ivec *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_is_old_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_is_old_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (meep::ivec *)& ((arg1)->is_old);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__ivec, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_ie_old_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::ivec *arg2 = (meep::ivec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_ie_old_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_ie_old_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_chunk_ie_old_set" "', argument " "2"" of type '" "meep::ivec *""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  if (arg1) (arg1)->ie_old = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_ie_old_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::ivec *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_ie_old_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_ie_old_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (meep::ivec *)& ((arg1)->ie_old);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__ivec, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_s0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::vec *arg2 = (meep::vec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_s0_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_s0_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_chunk_s0_set" "', argument " "2"" of type '" "meep::vec *""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  if (arg1) (arg1)->s0 = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_s0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::vec *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_s0_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_s0_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (meep::vec *)& ((arg1)->s0);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__vec, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_s1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::vec *arg2 = (meep::vec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_s1_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_s1_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_chunk_s1_set" "', argument " "2"" of type '" "meep::vec *""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  if (arg1) (arg1)->s1 = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_s1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::vec *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_s1_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_s1_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (meep::vec *)& ((arg1)->s1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__vec, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_e0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::vec *arg2 = (meep::vec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_e0_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_e0_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_chunk_e0_set" "', argument " "2"" of type '" "meep::vec *""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  if (arg1) (arg1)->e0 = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_e0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::vec *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_e0_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_e0_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (meep::vec *)& ((arg1)->e0);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__vec, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_e1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::vec *arg2 = (meep::vec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_e1_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_e1_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_chunk_e1_set" "', argument " "2"" of type '" "meep::vec *""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  if (arg1) (arg1)->e1 = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_e1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::vec *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_e1_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_e1_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (meep::vec *)& ((arg1)->e1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__vec, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_dV0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_dV0_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_dV0_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_chunk_dV0_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->dV0 = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_dV0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_dV0_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_dV0_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (double) ((arg1)->dV0);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_dV1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_dV1_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_dV1_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_chunk_dV1_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->dV1 = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_dV1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_dV1_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_dV1_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (double) ((arg1)->dV1);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_empty_dim_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  bool *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_empty_dim_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_empty_dim_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_bool, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_chunk_empty_dim_set" "', argument " "2"" of type '" "bool [5]""'"); 
  } 
  arg2 = reinterpret_cast< bool * >(argp2);
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)5; ++ii) *(bool *)&arg1->empty_dim[ii] = *((bool *)arg2 + ii);
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""empty_dim""' of type '""bool [5]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_empty_dim_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_empty_dim_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_empty_dim_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (bool *)(bool *) ((arg1)->empty_dim);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_bool, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_scale_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  std::complex< double > *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::complex< double > temp2 ;
  std::complex< double > val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_scale_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_scale_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_chunk_scale_set" "', argument " "2"" of type '" "std::complex< double >""'");
  } 
  temp2 = static_cast< std::complex< double > >(val2);
  arg2 = &temp2;
  if (arg1) (arg1)->scale = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_scale_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::complex< double > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_scale_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_scale_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (std::complex< double > *) & ((arg1)->scale);
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(*result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_shift_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::ivec *arg2 = (meep::ivec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_shift_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_shift_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_chunk_shift_set" "', argument " "2"" of type '" "meep::ivec *""'"); 
  }
  arg2 = reinterpret_cast< meep::ivec * >(argp2);
  if (arg1) (arg1)->shift = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_shift_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::ivec *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_shift_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_shift_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (meep::ivec *)& ((arg1)->shift);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__ivec, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_S_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::symmetry *arg2 = (meep::symmetry *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_S_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_S_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_chunk_S_set" "', argument " "2"" of type '" "meep::symmetry *""'"); 
  }
  arg2 = reinterpret_cast< meep::symmetry * >(argp2);
  if (arg1) (arg1)->S = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_S_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::symmetry *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_S_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_S_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (meep::symmetry *)& ((arg1)->S);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__symmetry, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_sn_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_sn_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_sn_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_chunk_sn_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  if (arg1) (arg1)->sn = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_sn_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_sn_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_sn_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (int) ((arg1)->sn);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_dft_phase_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  std::complex< meep::realnum > *arg2 = (std::complex< meep::realnum > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_dft_phase_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_dft_phase_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__complexT_double_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_chunk_dft_phase_set" "', argument " "2"" of type '" "std::complex< meep::realnum > *""'"); 
  }
  arg2 = reinterpret_cast< std::complex< meep::realnum > * >(argp2);
  if (arg1) (arg1)->dft_phase = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_dft_phase_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::complex< meep::realnum > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_dft_phase_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_dft_phase_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (std::complex< meep::realnum > *) ((arg1)->dft_phase);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_avg1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  ptrdiff_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_avg1_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_avg1_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_chunk_avg1_set" "', argument " "2"" of type '" "ptrdiff_t""'");
  } 
  arg2 = static_cast< ptrdiff_t >(val2);
  if (arg1) (arg1)->avg1 = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_avg1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  ptrdiff_t result;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_avg1_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_avg1_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result =  ((arg1)->avg1);
  resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_avg2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  ptrdiff_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_avg2_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_avg2_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_chunk_avg2_set" "', argument " "2"" of type '" "ptrdiff_t""'");
  } 
  arg2 = static_cast< ptrdiff_t >(val2);
  if (arg1) (arg1)->avg2 = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_avg2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  ptrdiff_t result;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_avg2_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_avg2_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result =  ((arg1)->avg2);
  resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_vc_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_vc_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_vc_set" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_chunk_vc_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  if (arg1) (arg1)->vc = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_chunk_vc_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "dft_chunk_vc_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_chunk_vc_get" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  result = (int) ((arg1)->vc);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *dft_chunk_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__dft_chunk, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *dft_chunk_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_save_dft_hdf5__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::component arg2 ;
  meep::h5file *arg3 = (meep::h5file *) 0 ;
  char *arg4 = (char *) 0 ;
  bool arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "save_dft_hdf5", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "save_dft_hdf5" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "save_dft_hdf5" "', argument " "3"" of type '" "meep::h5file *""'"); 
  }
  arg3 = reinterpret_cast< meep::h5file * >(argp3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "save_dft_hdf5" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "save_dft_hdf5" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  {
    try {
      meep::save_dft_hdf5(arg1,arg2,arg3,(char const *)arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return resultobj;
fail:
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_save_dft_hdf5__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::component arg2 ;
  meep::h5file *arg3 = (meep::h5file *) 0 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "save_dft_hdf5", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "save_dft_hdf5" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "save_dft_hdf5" "', argument " "3"" of type '" "meep::h5file *""'"); 
  }
  arg3 = reinterpret_cast< meep::h5file * >(argp3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "save_dft_hdf5" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  {
    try {
      meep::save_dft_hdf5(arg1,arg2,arg3,(char const *)arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return resultobj;
fail:
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_save_dft_hdf5__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::component arg2 ;
  meep::h5file *arg3 = (meep::h5file *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "save_dft_hdf5", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "save_dft_hdf5" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "save_dft_hdf5" "', argument " "3"" of type '" "meep::h5file *""'"); 
  }
  arg3 = reinterpret_cast< meep::h5file * >(argp3);
  {
    try {
      meep::save_dft_hdf5(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_load_dft_hdf5__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::component arg2 ;
  meep::h5file *arg3 = (meep::h5file *) 0 ;
  char *arg4 = (char *) 0 ;
  bool arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "load_dft_hdf5", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "load_dft_hdf5" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "load_dft_hdf5" "', argument " "3"" of type '" "meep::h5file *""'"); 
  }
  arg3 = reinterpret_cast< meep::h5file * >(argp3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "load_dft_hdf5" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "load_dft_hdf5" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  {
    try {
      meep::load_dft_hdf5(arg1,arg2,arg3,(char const *)arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return resultobj;
fail:
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_load_dft_hdf5__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::component arg2 ;
  meep::h5file *arg3 = (meep::h5file *) 0 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "load_dft_hdf5", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "load_dft_hdf5" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "load_dft_hdf5" "', argument " "3"" of type '" "meep::h5file *""'"); 
  }
  arg3 = reinterpret_cast< meep::h5file * >(argp3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "load_dft_hdf5" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  {
    try {
      meep::load_dft_hdf5(arg1,arg2,arg3,(char const *)arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return resultobj;
fail:
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_load_dft_hdf5__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::component arg2 ;
  meep::h5file *arg3 = (meep::h5file *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "load_dft_hdf5", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "load_dft_hdf5" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "load_dft_hdf5" "', argument " "3"" of type '" "meep::h5file *""'"); 
  }
  arg3 = reinterpret_cast< meep::h5file * >(argp3);
  {
    try {
      meep::load_dft_hdf5(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_save_dft_hdf5__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  char *arg2 = (char *) 0 ;
  meep::h5file *arg3 = (meep::h5file *) 0 ;
  char *arg4 = (char *) 0 ;
  bool arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "save_dft_hdf5", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "save_dft_hdf5" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "save_dft_hdf5" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "save_dft_hdf5" "', argument " "3"" of type '" "meep::h5file *""'"); 
  }
  arg3 = reinterpret_cast< meep::h5file * >(argp3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "save_dft_hdf5" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "save_dft_hdf5" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  {
    try {
      meep::save_dft_hdf5(arg1,(char const *)arg2,arg3,(char const *)arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_save_dft_hdf5__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  char *arg2 = (char *) 0 ;
  meep::h5file *arg3 = (meep::h5file *) 0 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "save_dft_hdf5", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "save_dft_hdf5" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "save_dft_hdf5" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "save_dft_hdf5" "', argument " "3"" of type '" "meep::h5file *""'"); 
  }
  arg3 = reinterpret_cast< meep::h5file * >(argp3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "save_dft_hdf5" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  {
    try {
      meep::save_dft_hdf5(arg1,(char const *)arg2,arg3,(char const *)arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_save_dft_hdf5__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  char *arg2 = (char *) 0 ;
  meep::h5file *arg3 = (meep::h5file *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "save_dft_hdf5", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "save_dft_hdf5" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "save_dft_hdf5" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "save_dft_hdf5" "', argument " "3"" of type '" "meep::h5file *""'"); 
  }
  arg3 = reinterpret_cast< meep::h5file * >(argp3);
  {
    try {
      meep::save_dft_hdf5(arg1,(char const *)arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_save_dft_hdf5(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__h5file, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_save_dft_hdf5__SWIG_2(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__h5file, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_save_dft_hdf5__SWIG_5(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__h5file, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_save_dft_hdf5__SWIG_1(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__h5file, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_save_dft_hdf5__SWIG_4(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__h5file, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_save_dft_hdf5__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__h5file, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_save_dft_hdf5__SWIG_3(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'save_dft_hdf5'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::save_dft_hdf5(meep::dft_chunk *,meep::component,meep::h5file *,char const *,bool)\n"
    "    meep::save_dft_hdf5(meep::dft_chunk *,meep::component,meep::h5file *,char const *)\n"
    "    meep::save_dft_hdf5(meep::dft_chunk *,meep::component,meep::h5file *)\n"
    "    meep::save_dft_hdf5(meep::dft_chunk *,char const *,meep::h5file *,char const *,bool)\n"
    "    meep::save_dft_hdf5(meep::dft_chunk *,char const *,meep::h5file *,char const *)\n"
    "    meep::save_dft_hdf5(meep::dft_chunk *,char const *,meep::h5file *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_load_dft_hdf5__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  char *arg2 = (char *) 0 ;
  meep::h5file *arg3 = (meep::h5file *) 0 ;
  char *arg4 = (char *) 0 ;
  bool arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "load_dft_hdf5", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "load_dft_hdf5" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "load_dft_hdf5" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "load_dft_hdf5" "', argument " "3"" of type '" "meep::h5file *""'"); 
  }
  arg3 = reinterpret_cast< meep::h5file * >(argp3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "load_dft_hdf5" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "load_dft_hdf5" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  {
    try {
      meep::load_dft_hdf5(arg1,(char const *)arg2,arg3,(char const *)arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_load_dft_hdf5__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  char *arg2 = (char *) 0 ;
  meep::h5file *arg3 = (meep::h5file *) 0 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "load_dft_hdf5", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "load_dft_hdf5" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "load_dft_hdf5" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "load_dft_hdf5" "', argument " "3"" of type '" "meep::h5file *""'"); 
  }
  arg3 = reinterpret_cast< meep::h5file * >(argp3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "load_dft_hdf5" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  {
    try {
      meep::load_dft_hdf5(arg1,(char const *)arg2,arg3,(char const *)arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_load_dft_hdf5__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  char *arg2 = (char *) 0 ;
  meep::h5file *arg3 = (meep::h5file *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "load_dft_hdf5", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "load_dft_hdf5" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "load_dft_hdf5" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "load_dft_hdf5" "', argument " "3"" of type '" "meep::h5file *""'"); 
  }
  arg3 = reinterpret_cast< meep::h5file * >(argp3);
  {
    try {
      meep::load_dft_hdf5(arg1,(char const *)arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_load_dft_hdf5(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__h5file, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_load_dft_hdf5__SWIG_2(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__h5file, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_load_dft_hdf5__SWIG_5(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__h5file, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_load_dft_hdf5__SWIG_1(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__h5file, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_load_dft_hdf5__SWIG_4(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__h5file, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_load_dft_hdf5__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__h5file, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_load_dft_hdf5__SWIG_3(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'load_dft_hdf5'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::load_dft_hdf5(meep::dft_chunk *,meep::component,meep::h5file *,char const *,bool)\n"
    "    meep::load_dft_hdf5(meep::dft_chunk *,meep::component,meep::h5file *,char const *)\n"
    "    meep::load_dft_hdf5(meep::dft_chunk *,meep::component,meep::h5file *)\n"
    "    meep::load_dft_hdf5(meep::dft_chunk *,char const *,meep::h5file *,char const *,bool)\n"
    "    meep::load_dft_hdf5(meep::dft_chunk *,char const *,meep::h5file *,char const *)\n"
    "    meep::load_dft_hdf5(meep::dft_chunk *,char const *,meep::h5file *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_new_dft_flux__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::component arg1 ;
  meep::component arg2 ;
  meep::dft_chunk *arg3 = (meep::dft_chunk *) 0 ;
  meep::dft_chunk *arg4 = (meep::dft_chunk *) 0 ;
  double arg5 ;
  double arg6 ;
  int arg7 ;
  meep::volume *arg8 = 0 ;
  meep::direction arg9 ;
  bool arg10 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  bool val10 ;
  int ecode10 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  meep::dft_flux *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_dft_flux", 10, 10, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9)) SWIG_fail;
  {
    arg1 = static_cast<meep::component>(PyInteger_AsLong(obj0));
  }
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_dft_flux" "', argument " "3"" of type '" "meep::dft_chunk *""'"); 
  }
  arg3 = reinterpret_cast< meep::dft_chunk * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_dft_flux" "', argument " "4"" of type '" "meep::dft_chunk *""'"); 
  }
  arg4 = reinterpret_cast< meep::dft_chunk * >(argp4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_dft_flux" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_dft_flux" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_int(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_dft_flux" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  res8 = SWIG_ConvertPtr(obj7, &argp8, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_dft_flux" "', argument " "8"" of type '" "meep::volume const &""'"); 
  }
  if (!argp8) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_flux" "', argument " "8"" of type '" "meep::volume const &""'"); 
  }
  arg8 = reinterpret_cast< meep::volume * >(argp8);
  ecode9 = SWIG_AsVal_int(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_dft_flux" "', argument " "9"" of type '" "meep::direction""'");
  } 
  arg9 = static_cast< meep::direction >(val9);
  ecode10 = SWIG_AsVal_bool(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_dft_flux" "', argument " "10"" of type '" "bool""'");
  } 
  arg10 = static_cast< bool >(val10);
  {
    try {
      result = (meep::dft_flux *)new meep::dft_flux(arg1,arg2,arg3,arg4,arg5,arg6,arg7,(meep::volume const &)*arg8,arg9,arg10);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_dft_flux__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::component arg1 ;
  meep::component arg2 ;
  meep::dft_chunk *arg3 = (meep::dft_chunk *) 0 ;
  meep::dft_chunk *arg4 = (meep::dft_chunk *) 0 ;
  std::vector< double,std::allocator< double > > *arg5 = 0 ;
  meep::volume *arg6 = 0 ;
  meep::direction arg7 ;
  bool arg8 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int res5 = SWIG_OLDOBJ ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  bool val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  meep::dft_flux *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_dft_flux", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  {
    arg1 = static_cast<meep::component>(PyInteger_AsLong(obj0));
  }
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_dft_flux" "', argument " "3"" of type '" "meep::dft_chunk *""'"); 
  }
  arg3 = reinterpret_cast< meep::dft_chunk * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_dft_flux" "', argument " "4"" of type '" "meep::dft_chunk *""'"); 
  }
  arg4 = reinterpret_cast< meep::dft_chunk * >(argp4);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res5 = swig::asptr(obj4, &ptr);
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_dft_flux" "', argument " "5"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_flux" "', argument " "5"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg5 = ptr;
  }
  res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_dft_flux" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  if (!argp6) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_flux" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  arg6 = reinterpret_cast< meep::volume * >(argp6);
  ecode7 = SWIG_AsVal_int(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_dft_flux" "', argument " "7"" of type '" "meep::direction""'");
  } 
  arg7 = static_cast< meep::direction >(val7);
  ecode8 = SWIG_AsVal_bool(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_dft_flux" "', argument " "8"" of type '" "bool""'");
  } 
  arg8 = static_cast< bool >(val8);
  {
    try {
      result = (meep::dft_flux *)new meep::dft_flux(arg1,arg2,arg3,arg4,(std::vector< double,std::allocator< double > > const &)*arg5,(meep::volume const &)*arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res5)) delete arg5;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res5)) delete arg5;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_dft_flux__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::component arg1 ;
  meep::component arg2 ;
  meep::dft_chunk *arg3 = (meep::dft_chunk *) 0 ;
  meep::dft_chunk *arg4 = (meep::dft_chunk *) 0 ;
  double *arg5 = (double *) 0 ;
  size_t arg6 ;
  meep::volume *arg7 = 0 ;
  meep::direction arg8 ;
  bool arg9 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  size_t val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  int val8 ;
  int ecode8 = 0 ;
  bool val9 ;
  int ecode9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  meep::dft_flux *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_dft_flux", 9, 9, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
  {
    arg1 = static_cast<meep::component>(PyInteger_AsLong(obj0));
  }
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_dft_flux" "', argument " "3"" of type '" "meep::dft_chunk *""'"); 
  }
  arg3 = reinterpret_cast< meep::dft_chunk * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_dft_flux" "', argument " "4"" of type '" "meep::dft_chunk *""'"); 
  }
  arg4 = reinterpret_cast< meep::dft_chunk * >(argp4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_dft_flux" "', argument " "5"" of type '" "double const *""'"); 
  }
  arg5 = reinterpret_cast< double * >(argp5);
  ecode6 = SWIG_AsVal_size_t(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_dft_flux" "', argument " "6"" of type '" "size_t""'");
  } 
  arg6 = static_cast< size_t >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_dft_flux" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_flux" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  arg7 = reinterpret_cast< meep::volume * >(argp7);
  ecode8 = SWIG_AsVal_int(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_dft_flux" "', argument " "8"" of type '" "meep::direction""'");
  } 
  arg8 = static_cast< meep::direction >(val8);
  ecode9 = SWIG_AsVal_bool(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_dft_flux" "', argument " "9"" of type '" "bool""'");
  } 
  arg9 = static_cast< bool >(val9);
  {
    try {
      result = (meep::dft_flux *)new meep::dft_flux(arg1,arg2,arg3,arg4,(double const *)arg5,arg6,(meep::volume const &)*arg7,arg8,arg9);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_dft_flux__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::dft_flux *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_dft_flux", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__dft_flux,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_dft_flux" "', argument " "1"" of type '" "meep::dft_flux const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_flux" "', argument " "1"" of type '" "meep::dft_flux const &""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  {
    try {
      result = (meep::dft_flux *)new meep::dft_flux((meep::dft_flux const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_dft_flux(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[11] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 10) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_dft_flux__SWIG_3(self, args);
    }
  }
  if (argc == 8) {
    int _v;
    {
      _v = PyInteger_Check(argv[0]) && PyInteger_AsLong(argv[0]) < 100;
    }
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            int res = swig::asptr(argv[4], (std::vector< double,std::allocator< double > >**)(0));
            _v = SWIG_CheckState(res);
            if (_v) {
              int res = SWIG_ConvertPtr(argv[5], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                {
                  int res = SWIG_AsVal_int(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_bool(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    return _wrap_new_dft_flux__SWIG_1(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 9) {
    int _v;
    {
      _v = PyInteger_Check(argv[0]) && PyInteger_AsLong(argv[0]) < 100;
    }
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_double, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                int res = SWIG_AsVal_size_t(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                int res = SWIG_ConvertPtr(argv[6], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  {
                    int res = SWIG_AsVal_int(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    {
                      int res = SWIG_AsVal_bool(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      return _wrap_new_dft_flux__SWIG_2(self, args);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 10) {
    int _v;
    {
      _v = PyInteger_Check(argv[0]) && PyInteger_AsLong(argv[0]) < 100;
    }
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_int(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  int res = SWIG_ConvertPtr(argv[7], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    {
                      int res = SWIG_AsVal_int(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        int res = SWIG_AsVal_bool(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        return _wrap_new_dft_flux__SWIG_0(self, args);
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_dft_flux'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::dft_flux::dft_flux(meep::component const,meep::component const,meep::dft_chunk *,meep::dft_chunk *,double,double,int,meep::volume const &,meep::direction,bool)\n"
    "    meep::dft_flux::dft_flux(meep::component const,meep::component const,meep::dft_chunk *,meep::dft_chunk *,std::vector< double,std::allocator< double > > const &,meep::volume const &,meep::direction,bool)\n"
    "    meep::dft_flux::dft_flux(meep::component const,meep::component const,meep::dft_chunk *,meep::dft_chunk *,double const *,size_t,meep::volume const &,meep::direction,bool)\n"
    "    meep::dft_flux::dft_flux(meep::dft_flux const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_dft_flux_flux(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_flux", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_flux" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  {
    try {
      result = (double *)(arg1)->flux();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    int size = arg1->freq.size();
    resultobj = PyList_New(size);
    for(int i = 0; i < size; i++) {
      PyList_SetItem(resultobj, i, PyFloat_FromDouble(result[i]));
    }
    
    delete[] result;
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_save_hdf5__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  meep::h5file *arg2 = (meep::h5file *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_save_hdf5", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_save_hdf5" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_flux_save_hdf5" "', argument " "2"" of type '" "meep::h5file *""'"); 
  }
  arg2 = reinterpret_cast< meep::h5file * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_flux_save_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try {
      (arg1)->save_hdf5(arg2,(char const *)arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_save_hdf5__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  meep::h5file *arg2 = (meep::h5file *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_save_hdf5", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_save_hdf5" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_flux_save_hdf5" "', argument " "2"" of type '" "meep::h5file *""'"); 
  }
  arg2 = reinterpret_cast< meep::h5file * >(argp2);
  {
    try {
      (arg1)->save_hdf5(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_load_hdf5__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  meep::h5file *arg2 = (meep::h5file *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_load_hdf5", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_load_hdf5" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_flux_load_hdf5" "', argument " "2"" of type '" "meep::h5file *""'"); 
  }
  arg2 = reinterpret_cast< meep::h5file * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_flux_load_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try {
      (arg1)->load_hdf5(arg2,(char const *)arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_load_hdf5__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  meep::h5file *arg2 = (meep::h5file *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_load_hdf5", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_load_hdf5" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_flux_load_hdf5" "', argument " "2"" of type '" "meep::h5file *""'"); 
  }
  arg2 = reinterpret_cast< meep::h5file * >(argp2);
  {
    try {
      (arg1)->load_hdf5(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  meep::dft_flux *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux___isub__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux___isub__" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_flux,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_flux___isub__" "', argument " "2"" of type '" "meep::dft_flux const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_flux___isub__" "', argument " "2"" of type '" "meep::dft_flux const &""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_flux * >(argp2);
  {
    try {
      (arg1)->operator -=((meep::dft_flux const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_save_hdf5__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  meep::fields *arg2 = 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  char *arg5 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  int res5 ;
  char *buf5 = 0 ;
  int alloc5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_save_hdf5", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_save_hdf5" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_flux_save_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_flux_save_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_flux_save_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dft_flux_save_hdf5" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "dft_flux_save_hdf5" "', argument " "5"" of type '" "char const *""'");
  }
  arg5 = reinterpret_cast< char * >(buf5);
  {
    try {
      (arg1)->save_hdf5(*arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_save_hdf5__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  meep::fields *arg2 = 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_save_hdf5", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_save_hdf5" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_flux_save_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_flux_save_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_flux_save_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dft_flux_save_hdf5" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  {
    try {
      (arg1)->save_hdf5(*arg2,(char const *)arg3,(char const *)arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_save_hdf5__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  meep::fields *arg2 = 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_save_hdf5", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_save_hdf5" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_flux_save_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_flux_save_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_flux_save_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try {
      (arg1)->save_hdf5(*arg2,(char const *)arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_save_hdf5(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_flux, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__h5file, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_dft_flux_save_hdf5__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_flux, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__h5file, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_dft_flux_save_hdf5__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_flux, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_dft_flux_save_hdf5__SWIG_4(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_flux, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_dft_flux_save_hdf5__SWIG_3(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_flux, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            int res = SWIG_AsCharPtrAndSize(argv[4], 0, NULL, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_dft_flux_save_hdf5__SWIG_2(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'dft_flux_save_hdf5'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::dft_flux::save_hdf5(meep::h5file *,char const *)\n"
    "    meep::dft_flux::save_hdf5(meep::h5file *)\n"
    "    meep::dft_flux::save_hdf5(meep::fields &,char const *,char const *,char const *)\n"
    "    meep::dft_flux::save_hdf5(meep::fields &,char const *,char const *)\n"
    "    meep::dft_flux::save_hdf5(meep::fields &,char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_dft_flux_load_hdf5__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  meep::fields *arg2 = 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  char *arg5 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  int res5 ;
  char *buf5 = 0 ;
  int alloc5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_load_hdf5", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_load_hdf5" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_flux_load_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_flux_load_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_flux_load_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dft_flux_load_hdf5" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "dft_flux_load_hdf5" "', argument " "5"" of type '" "char const *""'");
  }
  arg5 = reinterpret_cast< char * >(buf5);
  {
    try {
      (arg1)->load_hdf5(*arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_load_hdf5__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  meep::fields *arg2 = 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_load_hdf5", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_load_hdf5" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_flux_load_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_flux_load_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_flux_load_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dft_flux_load_hdf5" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  {
    try {
      (arg1)->load_hdf5(*arg2,(char const *)arg3,(char const *)arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_load_hdf5__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  meep::fields *arg2 = 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_load_hdf5", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_load_hdf5" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_flux_load_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_flux_load_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_flux_load_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try {
      (arg1)->load_hdf5(*arg2,(char const *)arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_load_hdf5(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_flux, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__h5file, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_dft_flux_load_hdf5__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_flux, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__h5file, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_dft_flux_load_hdf5__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_flux, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_dft_flux_load_hdf5__SWIG_4(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_flux, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_dft_flux_load_hdf5__SWIG_3(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_flux, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            int res = SWIG_AsCharPtrAndSize(argv[4], 0, NULL, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_dft_flux_load_hdf5__SWIG_2(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'dft_flux_load_hdf5'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::dft_flux::load_hdf5(meep::h5file *,char const *)\n"
    "    meep::dft_flux::load_hdf5(meep::h5file *)\n"
    "    meep::dft_flux::load_hdf5(meep::fields &,char const *,char const *,char const *)\n"
    "    meep::dft_flux::load_hdf5(meep::fields &,char const *,char const *)\n"
    "    meep::dft_flux::load_hdf5(meep::fields &,char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_dft_flux_scale_dfts(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  std::complex< double > arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::complex< double > val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_scale_dfts", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_scale_dfts" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_flux_scale_dfts" "', argument " "2"" of type '" "std::complex< double >""'");
  } 
  arg2 = static_cast< std::complex< double > >(val2);
  {
    try {
      (arg1)->scale_dfts(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_remove", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_remove" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  {
    try {
      (arg1)->remove();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_freq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  std::vector< double,std::allocator< double > > *arg2 = (std::vector< double,std::allocator< double > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_freq_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_freq_set" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_flux_freq_set" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > *""'"); 
  }
  arg2 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp2);
  if (arg1) (arg1)->freq = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_freq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< double,std::allocator< double > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_freq_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_freq_get" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  result = (std::vector< double,std::allocator< double > > *)& ((arg1)->freq);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_E_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_E_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_E_set" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__dft_chunk, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_flux_E_set" "', argument " "2"" of type '" "meep::dft_chunk *""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk * >(argp2);
  if (arg1) (arg1)->E = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_E_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_E_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_E_get" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  result = (meep::dft_chunk *) ((arg1)->E);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_H_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_H_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_H_set" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__dft_chunk, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_flux_H_set" "', argument " "2"" of type '" "meep::dft_chunk *""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk * >(argp2);
  if (arg1) (arg1)->H = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_H_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_H_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_H_get" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  result = (meep::dft_chunk *) ((arg1)->H);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_cE_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  meep::component arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_cE_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_cE_set" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  if (arg1) (arg1)->cE = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_cE_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::component result;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_cE_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_cE_get" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  result = (meep::component) ((arg1)->cE);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_cH_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  meep::component arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_cH_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_cH_set" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  if (arg1) (arg1)->cH = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_cH_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::component result;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_cH_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_cH_get" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  result = (meep::component) ((arg1)->cH);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_where_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  meep::volume *arg2 = (meep::volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_where_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_where_set" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_flux_where_set" "', argument " "2"" of type '" "meep::volume *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  if (arg1) (arg1)->where = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_where_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::volume *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_where_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_where_get" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  result = (meep::volume *)& ((arg1)->where);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__volume, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_normal_direction_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  meep::direction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_normal_direction_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_normal_direction_set" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_flux_normal_direction_set" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  if (arg1) (arg1)->normal_direction = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_normal_direction_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::direction result;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_normal_direction_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_normal_direction_get" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  result = (meep::direction) ((arg1)->normal_direction);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_use_symmetry_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_use_symmetry_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_use_symmetry_set" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  ecode2 = SWIG_AsVal_bool(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_flux_use_symmetry_set" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  if (arg1) (arg1)->use_symmetry = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_flux_use_symmetry_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "dft_flux_use_symmetry_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_flux_use_symmetry_get" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  result = (bool) ((arg1)->use_symmetry);
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_dft_flux(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_flux *arg1 = (meep::dft_flux *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_dft_flux", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_dft_flux" "', argument " "1"" of type '" "meep::dft_flux *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_flux * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *dft_flux_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__dft_flux, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *dft_flux_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_dft_energy__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ;
  meep::dft_chunk *arg3 = (meep::dft_chunk *) 0 ;
  meep::dft_chunk *arg4 = (meep::dft_chunk *) 0 ;
  double arg5 ;
  double arg6 ;
  int arg7 ;
  meep::volume *arg8 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  meep::dft_energy *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_dft_energy", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_dft_energy" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_dft_energy" "', argument " "2"" of type '" "meep::dft_chunk *""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_dft_energy" "', argument " "3"" of type '" "meep::dft_chunk *""'"); 
  }
  arg3 = reinterpret_cast< meep::dft_chunk * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_dft_energy" "', argument " "4"" of type '" "meep::dft_chunk *""'"); 
  }
  arg4 = reinterpret_cast< meep::dft_chunk * >(argp4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_dft_energy" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_dft_energy" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_int(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_dft_energy" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  res8 = SWIG_ConvertPtr(obj7, &argp8, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_dft_energy" "', argument " "8"" of type '" "meep::volume const &""'"); 
  }
  if (!argp8) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_energy" "', argument " "8"" of type '" "meep::volume const &""'"); 
  }
  arg8 = reinterpret_cast< meep::volume * >(argp8);
  {
    try {
      result = (meep::dft_energy *)new meep::dft_energy(arg1,arg2,arg3,arg4,arg5,arg6,arg7,(meep::volume const &)*arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_energy, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_dft_energy__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ;
  meep::dft_chunk *arg3 = (meep::dft_chunk *) 0 ;
  meep::dft_chunk *arg4 = (meep::dft_chunk *) 0 ;
  std::vector< double,std::allocator< double > > *arg5 = 0 ;
  meep::volume *arg6 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int res5 = SWIG_OLDOBJ ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  meep::dft_energy *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_dft_energy", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_dft_energy" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_dft_energy" "', argument " "2"" of type '" "meep::dft_chunk *""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_dft_energy" "', argument " "3"" of type '" "meep::dft_chunk *""'"); 
  }
  arg3 = reinterpret_cast< meep::dft_chunk * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_dft_energy" "', argument " "4"" of type '" "meep::dft_chunk *""'"); 
  }
  arg4 = reinterpret_cast< meep::dft_chunk * >(argp4);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res5 = swig::asptr(obj4, &ptr);
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_dft_energy" "', argument " "5"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_energy" "', argument " "5"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg5 = ptr;
  }
  res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_dft_energy" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  if (!argp6) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_energy" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  arg6 = reinterpret_cast< meep::volume * >(argp6);
  {
    try {
      result = (meep::dft_energy *)new meep::dft_energy(arg1,arg2,arg3,arg4,(std::vector< double,std::allocator< double > > const &)*arg5,(meep::volume const &)*arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_energy, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res5)) delete arg5;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res5)) delete arg5;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_dft_energy__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ;
  meep::dft_chunk *arg3 = (meep::dft_chunk *) 0 ;
  meep::dft_chunk *arg4 = (meep::dft_chunk *) 0 ;
  double *arg5 = (double *) 0 ;
  size_t arg6 ;
  meep::volume *arg7 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  size_t val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  meep::dft_energy *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_dft_energy", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_dft_energy" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_dft_energy" "', argument " "2"" of type '" "meep::dft_chunk *""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_dft_energy" "', argument " "3"" of type '" "meep::dft_chunk *""'"); 
  }
  arg3 = reinterpret_cast< meep::dft_chunk * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_dft_energy" "', argument " "4"" of type '" "meep::dft_chunk *""'"); 
  }
  arg4 = reinterpret_cast< meep::dft_chunk * >(argp4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_dft_energy" "', argument " "5"" of type '" "double const *""'"); 
  }
  arg5 = reinterpret_cast< double * >(argp5);
  ecode6 = SWIG_AsVal_size_t(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_dft_energy" "', argument " "6"" of type '" "size_t""'");
  } 
  arg6 = static_cast< size_t >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_dft_energy" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_energy" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  arg7 = reinterpret_cast< meep::volume * >(argp7);
  {
    try {
      result = (meep::dft_energy *)new meep::dft_energy(arg1,arg2,arg3,arg4,(double const *)arg5,arg6,(meep::volume const &)*arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_energy, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_dft_energy__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::dft_energy *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_dft_energy", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__dft_energy,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_dft_energy" "', argument " "1"" of type '" "meep::dft_energy const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_energy" "', argument " "1"" of type '" "meep::dft_energy const &""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  {
    try {
      result = (meep::dft_energy *)new meep::dft_energy((meep::dft_energy const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_energy, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_dft_energy(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[9] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 8) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__dft_energy, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_dft_energy__SWIG_3(self, args);
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            int res = swig::asptr(argv[4], (std::vector< double,std::allocator< double > >**)(0));
            _v = SWIG_CheckState(res);
            if (_v) {
              int res = SWIG_ConvertPtr(argv[5], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                return _wrap_new_dft_energy__SWIG_1(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_double, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                int res = SWIG_AsVal_size_t(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                int res = SWIG_ConvertPtr(argv[6], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  return _wrap_new_dft_energy__SWIG_2(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_int(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  int res = SWIG_ConvertPtr(argv[7], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    return _wrap_new_dft_energy__SWIG_0(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_dft_energy'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::dft_energy::dft_energy(meep::dft_chunk *,meep::dft_chunk *,meep::dft_chunk *,meep::dft_chunk *,double,double,int,meep::volume const &)\n"
    "    meep::dft_energy::dft_energy(meep::dft_chunk *,meep::dft_chunk *,meep::dft_chunk *,meep::dft_chunk *,std::vector< double,std::allocator< double > > const &,meep::volume const &)\n"
    "    meep::dft_energy::dft_energy(meep::dft_chunk *,meep::dft_chunk *,meep::dft_chunk *,meep::dft_chunk *,double const *,size_t,meep::volume const &)\n"
    "    meep::dft_energy::dft_energy(meep::dft_energy const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_dft_energy_electric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_electric", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_electric" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  {
    try {
      result = (double *)(arg1)->electric();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    int size = arg1->freq.size();
    resultobj = PyList_New(size);
    for(int i = 0; i < size; i++) {
      PyList_SetItem(resultobj, i, PyFloat_FromDouble(result[i]));
    }
    
    delete[] result;
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_magnetic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_magnetic", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_magnetic" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  {
    try {
      result = (double *)(arg1)->magnetic();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    int size = arg1->freq.size();
    resultobj = PyList_New(size);
    for(int i = 0; i < size; i++) {
      PyList_SetItem(resultobj, i, PyFloat_FromDouble(result[i]));
    }
    
    delete[] result;
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_total(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_total", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_total" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  {
    try {
      result = (double *)(arg1)->total();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    int size = arg1->freq.size();
    resultobj = PyList_New(size);
    for(int i = 0; i < size; i++) {
      PyList_SetItem(resultobj, i, PyFloat_FromDouble(result[i]));
    }
    
    delete[] result;
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_save_hdf5__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  meep::h5file *arg2 = (meep::h5file *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_save_hdf5", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_save_hdf5" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_energy_save_hdf5" "', argument " "2"" of type '" "meep::h5file *""'"); 
  }
  arg2 = reinterpret_cast< meep::h5file * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_energy_save_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try {
      (arg1)->save_hdf5(arg2,(char const *)arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_save_hdf5__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  meep::h5file *arg2 = (meep::h5file *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_save_hdf5", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_save_hdf5" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_energy_save_hdf5" "', argument " "2"" of type '" "meep::h5file *""'"); 
  }
  arg2 = reinterpret_cast< meep::h5file * >(argp2);
  {
    try {
      (arg1)->save_hdf5(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_load_hdf5__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  meep::h5file *arg2 = (meep::h5file *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_load_hdf5", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_load_hdf5" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_energy_load_hdf5" "', argument " "2"" of type '" "meep::h5file *""'"); 
  }
  arg2 = reinterpret_cast< meep::h5file * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_energy_load_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try {
      (arg1)->load_hdf5(arg2,(char const *)arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_load_hdf5__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  meep::h5file *arg2 = (meep::h5file *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_load_hdf5", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_load_hdf5" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_energy_load_hdf5" "', argument " "2"" of type '" "meep::h5file *""'"); 
  }
  arg2 = reinterpret_cast< meep::h5file * >(argp2);
  {
    try {
      (arg1)->load_hdf5(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  meep::dft_energy *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy___isub__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy___isub__" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_energy,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_energy___isub__" "', argument " "2"" of type '" "meep::dft_energy const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_energy___isub__" "', argument " "2"" of type '" "meep::dft_energy const &""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_energy * >(argp2);
  {
    try {
      (arg1)->operator -=((meep::dft_energy const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_save_hdf5__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  meep::fields *arg2 = 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  char *arg5 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  int res5 ;
  char *buf5 = 0 ;
  int alloc5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_save_hdf5", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_save_hdf5" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_energy_save_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_energy_save_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_energy_save_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dft_energy_save_hdf5" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "dft_energy_save_hdf5" "', argument " "5"" of type '" "char const *""'");
  }
  arg5 = reinterpret_cast< char * >(buf5);
  {
    try {
      (arg1)->save_hdf5(*arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_save_hdf5__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  meep::fields *arg2 = 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_save_hdf5", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_save_hdf5" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_energy_save_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_energy_save_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_energy_save_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dft_energy_save_hdf5" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  {
    try {
      (arg1)->save_hdf5(*arg2,(char const *)arg3,(char const *)arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_save_hdf5__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  meep::fields *arg2 = 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_save_hdf5", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_save_hdf5" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_energy_save_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_energy_save_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_energy_save_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try {
      (arg1)->save_hdf5(*arg2,(char const *)arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_save_hdf5(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_energy, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__h5file, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_dft_energy_save_hdf5__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_energy, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__h5file, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_dft_energy_save_hdf5__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_energy, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_dft_energy_save_hdf5__SWIG_4(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_energy, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_dft_energy_save_hdf5__SWIG_3(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_energy, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            int res = SWIG_AsCharPtrAndSize(argv[4], 0, NULL, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_dft_energy_save_hdf5__SWIG_2(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'dft_energy_save_hdf5'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::dft_energy::save_hdf5(meep::h5file *,char const *)\n"
    "    meep::dft_energy::save_hdf5(meep::h5file *)\n"
    "    meep::dft_energy::save_hdf5(meep::fields &,char const *,char const *,char const *)\n"
    "    meep::dft_energy::save_hdf5(meep::fields &,char const *,char const *)\n"
    "    meep::dft_energy::save_hdf5(meep::fields &,char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_dft_energy_load_hdf5__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  meep::fields *arg2 = 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  char *arg5 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  int res5 ;
  char *buf5 = 0 ;
  int alloc5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_load_hdf5", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_load_hdf5" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_energy_load_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_energy_load_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_energy_load_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dft_energy_load_hdf5" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "dft_energy_load_hdf5" "', argument " "5"" of type '" "char const *""'");
  }
  arg5 = reinterpret_cast< char * >(buf5);
  {
    try {
      (arg1)->load_hdf5(*arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_load_hdf5__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  meep::fields *arg2 = 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_load_hdf5", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_load_hdf5" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_energy_load_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_energy_load_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_energy_load_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dft_energy_load_hdf5" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  {
    try {
      (arg1)->load_hdf5(*arg2,(char const *)arg3,(char const *)arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_load_hdf5__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  meep::fields *arg2 = 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_load_hdf5", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_load_hdf5" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_energy_load_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_energy_load_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_energy_load_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try {
      (arg1)->load_hdf5(*arg2,(char const *)arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_load_hdf5(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_energy, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__h5file, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_dft_energy_load_hdf5__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_energy, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__h5file, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_dft_energy_load_hdf5__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_energy, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_dft_energy_load_hdf5__SWIG_4(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_energy, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_dft_energy_load_hdf5__SWIG_3(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_energy, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            int res = SWIG_AsCharPtrAndSize(argv[4], 0, NULL, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_dft_energy_load_hdf5__SWIG_2(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'dft_energy_load_hdf5'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::dft_energy::load_hdf5(meep::h5file *,char const *)\n"
    "    meep::dft_energy::load_hdf5(meep::h5file *)\n"
    "    meep::dft_energy::load_hdf5(meep::fields &,char const *,char const *,char const *)\n"
    "    meep::dft_energy::load_hdf5(meep::fields &,char const *,char const *)\n"
    "    meep::dft_energy::load_hdf5(meep::fields &,char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_dft_energy_scale_dfts(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  std::complex< double > arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::complex< double > val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_scale_dfts", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_scale_dfts" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_energy_scale_dfts" "', argument " "2"" of type '" "std::complex< double >""'");
  } 
  arg2 = static_cast< std::complex< double > >(val2);
  {
    try {
      (arg1)->scale_dfts(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_remove", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_remove" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  {
    try {
      (arg1)->remove();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_freq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  std::vector< double,std::allocator< double > > *arg2 = (std::vector< double,std::allocator< double > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_freq_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_freq_set" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_energy_freq_set" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > *""'"); 
  }
  arg2 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp2);
  if (arg1) (arg1)->freq = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_freq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< double,std::allocator< double > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_freq_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_freq_get" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  result = (std::vector< double,std::allocator< double > > *)& ((arg1)->freq);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_E_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_E_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_E_set" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__dft_chunk, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_energy_E_set" "', argument " "2"" of type '" "meep::dft_chunk *""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk * >(argp2);
  if (arg1) (arg1)->E = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_E_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_E_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_E_get" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  result = (meep::dft_chunk *) ((arg1)->E);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_H_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_H_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_H_set" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__dft_chunk, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_energy_H_set" "', argument " "2"" of type '" "meep::dft_chunk *""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk * >(argp2);
  if (arg1) (arg1)->H = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_H_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_H_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_H_get" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  result = (meep::dft_chunk *) ((arg1)->H);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_D_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_D_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_D_set" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__dft_chunk, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_energy_D_set" "', argument " "2"" of type '" "meep::dft_chunk *""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk * >(argp2);
  if (arg1) (arg1)->D = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_D_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_D_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_D_get" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  result = (meep::dft_chunk *) ((arg1)->D);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_B_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_B_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_B_set" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__dft_chunk, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_energy_B_set" "', argument " "2"" of type '" "meep::dft_chunk *""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk * >(argp2);
  if (arg1) (arg1)->B = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_B_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_B_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_B_get" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  result = (meep::dft_chunk *) ((arg1)->B);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_where_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  meep::volume *arg2 = (meep::volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_where_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_where_set" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_energy_where_set" "', argument " "2"" of type '" "meep::volume *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  if (arg1) (arg1)->where = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_energy_where_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::volume *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_energy_where_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_energy_where_get" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  result = (meep::volume *)& ((arg1)->where);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__volume, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_dft_energy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_energy *arg1 = (meep::dft_energy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_dft_energy", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_energy, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_dft_energy" "', argument " "1"" of type '" "meep::dft_energy *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_energy * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *dft_energy_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__dft_energy, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *dft_energy_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_dft_force__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ;
  meep::dft_chunk *arg3 = (meep::dft_chunk *) 0 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  meep::volume *arg7 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  meep::dft_force *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_dft_force", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_dft_force" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_dft_force" "', argument " "2"" of type '" "meep::dft_chunk *""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_dft_force" "', argument " "3"" of type '" "meep::dft_chunk *""'"); 
  }
  arg3 = reinterpret_cast< meep::dft_chunk * >(argp3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_dft_force" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_dft_force" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_dft_force" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_dft_force" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_force" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  arg7 = reinterpret_cast< meep::volume * >(argp7);
  {
    try {
      result = (meep::dft_force *)new meep::dft_force(arg1,arg2,arg3,arg4,arg5,arg6,(meep::volume const &)*arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_force, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_dft_force__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ;
  meep::dft_chunk *arg3 = (meep::dft_chunk *) 0 ;
  std::vector< double,std::allocator< double > > *arg4 = 0 ;
  meep::volume *arg5 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  meep::dft_force *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_dft_force", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_dft_force" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_dft_force" "', argument " "2"" of type '" "meep::dft_chunk *""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_dft_force" "', argument " "3"" of type '" "meep::dft_chunk *""'"); 
  }
  arg3 = reinterpret_cast< meep::dft_chunk * >(argp3);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_dft_force" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_force" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg4 = ptr;
  }
  res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_dft_force" "', argument " "5"" of type '" "meep::volume const &""'"); 
  }
  if (!argp5) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_force" "', argument " "5"" of type '" "meep::volume const &""'"); 
  }
  arg5 = reinterpret_cast< meep::volume * >(argp5);
  {
    try {
      result = (meep::dft_force *)new meep::dft_force(arg1,arg2,arg3,(std::vector< double,std::allocator< double > > const &)*arg4,(meep::volume const &)*arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_force, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_dft_force__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ;
  meep::dft_chunk *arg3 = (meep::dft_chunk *) 0 ;
  double *arg4 = (double *) 0 ;
  size_t arg5 ;
  meep::volume *arg6 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  size_t val5 ;
  int ecode5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  meep::dft_force *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_dft_force", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_dft_force" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_dft_force" "', argument " "2"" of type '" "meep::dft_chunk *""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_dft_force" "', argument " "3"" of type '" "meep::dft_chunk *""'"); 
  }
  arg3 = reinterpret_cast< meep::dft_chunk * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_dft_force" "', argument " "4"" of type '" "double const *""'"); 
  }
  arg4 = reinterpret_cast< double * >(argp4);
  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_dft_force" "', argument " "5"" of type '" "size_t""'");
  } 
  arg5 = static_cast< size_t >(val5);
  res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_dft_force" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  if (!argp6) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_force" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  arg6 = reinterpret_cast< meep::volume * >(argp6);
  {
    try {
      result = (meep::dft_force *)new meep::dft_force(arg1,arg2,arg3,(double const *)arg4,arg5,(meep::volume const &)*arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_force, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_dft_force__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::dft_force *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_dft_force", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__dft_force,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_dft_force" "', argument " "1"" of type '" "meep::dft_force const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_force" "', argument " "1"" of type '" "meep::dft_force const &""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  {
    try {
      result = (meep::dft_force *)new meep::dft_force((meep::dft_force const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_force, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_dft_force(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[8] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 7) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__dft_force, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_dft_force__SWIG_3(self, args);
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            int res = SWIG_ConvertPtr(argv[4], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_new_dft_force__SWIG_1(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_size_t(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              int res = SWIG_ConvertPtr(argv[5], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                return _wrap_new_dft_force__SWIG_2(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                int res = SWIG_ConvertPtr(argv[6], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  return _wrap_new_dft_force__SWIG_0(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_dft_force'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::dft_force::dft_force(meep::dft_chunk *,meep::dft_chunk *,meep::dft_chunk *,double,double,int,meep::volume const &)\n"
    "    meep::dft_force::dft_force(meep::dft_chunk *,meep::dft_chunk *,meep::dft_chunk *,std::vector< double,std::allocator< double > > const &,meep::volume const &)\n"
    "    meep::dft_force::dft_force(meep::dft_chunk *,meep::dft_chunk *,meep::dft_chunk *,double const *,size_t,meep::volume const &)\n"
    "    meep::dft_force::dft_force(meep::dft_force const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_dft_force_force(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = (meep::dft_force *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_force_force", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_force, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_force_force" "', argument " "1"" of type '" "meep::dft_force *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  {
    try {
      result = (double *)(arg1)->force();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    int size = arg1->freq.size();
    resultobj = PyList_New(size);
    for(int i = 0; i < size; i++) {
      PyList_SetItem(resultobj, i, PyFloat_FromDouble(result[i]));
    }
    
    delete[] result;
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_force_save_hdf5__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = (meep::dft_force *) 0 ;
  meep::h5file *arg2 = (meep::h5file *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_force_save_hdf5", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_force, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_force_save_hdf5" "', argument " "1"" of type '" "meep::dft_force *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_force_save_hdf5" "', argument " "2"" of type '" "meep::h5file *""'"); 
  }
  arg2 = reinterpret_cast< meep::h5file * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_force_save_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try {
      (arg1)->save_hdf5(arg2,(char const *)arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_force_save_hdf5__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = (meep::dft_force *) 0 ;
  meep::h5file *arg2 = (meep::h5file *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_force_save_hdf5", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_force, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_force_save_hdf5" "', argument " "1"" of type '" "meep::dft_force *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_force_save_hdf5" "', argument " "2"" of type '" "meep::h5file *""'"); 
  }
  arg2 = reinterpret_cast< meep::h5file * >(argp2);
  {
    try {
      (arg1)->save_hdf5(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_force_load_hdf5__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = (meep::dft_force *) 0 ;
  meep::h5file *arg2 = (meep::h5file *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_force_load_hdf5", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_force, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_force_load_hdf5" "', argument " "1"" of type '" "meep::dft_force *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_force_load_hdf5" "', argument " "2"" of type '" "meep::h5file *""'"); 
  }
  arg2 = reinterpret_cast< meep::h5file * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_force_load_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try {
      (arg1)->load_hdf5(arg2,(char const *)arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_force_load_hdf5__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = (meep::dft_force *) 0 ;
  meep::h5file *arg2 = (meep::h5file *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_force_load_hdf5", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_force, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_force_load_hdf5" "', argument " "1"" of type '" "meep::dft_force *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_force_load_hdf5" "', argument " "2"" of type '" "meep::h5file *""'"); 
  }
  arg2 = reinterpret_cast< meep::h5file * >(argp2);
  {
    try {
      (arg1)->load_hdf5(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_force___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = (meep::dft_force *) 0 ;
  meep::dft_force *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_force___isub__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_force, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_force___isub__" "', argument " "1"" of type '" "meep::dft_force *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_force,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_force___isub__" "', argument " "2"" of type '" "meep::dft_force const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_force___isub__" "', argument " "2"" of type '" "meep::dft_force const &""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_force * >(argp2);
  {
    try {
      (arg1)->operator -=((meep::dft_force const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_force_save_hdf5__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = (meep::dft_force *) 0 ;
  meep::fields *arg2 = 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  char *arg5 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  int res5 ;
  char *buf5 = 0 ;
  int alloc5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_force_save_hdf5", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_force, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_force_save_hdf5" "', argument " "1"" of type '" "meep::dft_force *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_force_save_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_force_save_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_force_save_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dft_force_save_hdf5" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "dft_force_save_hdf5" "', argument " "5"" of type '" "char const *""'");
  }
  arg5 = reinterpret_cast< char * >(buf5);
  {
    try {
      (arg1)->save_hdf5(*arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_force_save_hdf5__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = (meep::dft_force *) 0 ;
  meep::fields *arg2 = 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_force_save_hdf5", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_force, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_force_save_hdf5" "', argument " "1"" of type '" "meep::dft_force *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_force_save_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_force_save_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_force_save_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dft_force_save_hdf5" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  {
    try {
      (arg1)->save_hdf5(*arg2,(char const *)arg3,(char const *)arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_force_save_hdf5__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = (meep::dft_force *) 0 ;
  meep::fields *arg2 = 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_force_save_hdf5", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_force, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_force_save_hdf5" "', argument " "1"" of type '" "meep::dft_force *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_force_save_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_force_save_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_force_save_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try {
      (arg1)->save_hdf5(*arg2,(char const *)arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_force_save_hdf5(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_force, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__h5file, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_dft_force_save_hdf5__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_force, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__h5file, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_dft_force_save_hdf5__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_force, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_dft_force_save_hdf5__SWIG_4(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_force, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_dft_force_save_hdf5__SWIG_3(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_force, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            int res = SWIG_AsCharPtrAndSize(argv[4], 0, NULL, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_dft_force_save_hdf5__SWIG_2(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'dft_force_save_hdf5'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::dft_force::save_hdf5(meep::h5file *,char const *)\n"
    "    meep::dft_force::save_hdf5(meep::h5file *)\n"
    "    meep::dft_force::save_hdf5(meep::fields &,char const *,char const *,char const *)\n"
    "    meep::dft_force::save_hdf5(meep::fields &,char const *,char const *)\n"
    "    meep::dft_force::save_hdf5(meep::fields &,char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_dft_force_load_hdf5__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = (meep::dft_force *) 0 ;
  meep::fields *arg2 = 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  char *arg5 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  int res5 ;
  char *buf5 = 0 ;
  int alloc5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_force_load_hdf5", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_force, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_force_load_hdf5" "', argument " "1"" of type '" "meep::dft_force *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_force_load_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_force_load_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_force_load_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dft_force_load_hdf5" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "dft_force_load_hdf5" "', argument " "5"" of type '" "char const *""'");
  }
  arg5 = reinterpret_cast< char * >(buf5);
  {
    try {
      (arg1)->load_hdf5(*arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_force_load_hdf5__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = (meep::dft_force *) 0 ;
  meep::fields *arg2 = 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_force_load_hdf5", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_force, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_force_load_hdf5" "', argument " "1"" of type '" "meep::dft_force *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_force_load_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_force_load_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_force_load_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dft_force_load_hdf5" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  {
    try {
      (arg1)->load_hdf5(*arg2,(char const *)arg3,(char const *)arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_force_load_hdf5__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = (meep::dft_force *) 0 ;
  meep::fields *arg2 = 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_force_load_hdf5", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_force, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_force_load_hdf5" "', argument " "1"" of type '" "meep::dft_force *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_force_load_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_force_load_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_force_load_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try {
      (arg1)->load_hdf5(*arg2,(char const *)arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_force_load_hdf5(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_force, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__h5file, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_dft_force_load_hdf5__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_force, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__h5file, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_dft_force_load_hdf5__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_force, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_dft_force_load_hdf5__SWIG_4(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_force, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_dft_force_load_hdf5__SWIG_3(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_force, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            int res = SWIG_AsCharPtrAndSize(argv[4], 0, NULL, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_dft_force_load_hdf5__SWIG_2(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'dft_force_load_hdf5'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::dft_force::load_hdf5(meep::h5file *,char const *)\n"
    "    meep::dft_force::load_hdf5(meep::h5file *)\n"
    "    meep::dft_force::load_hdf5(meep::fields &,char const *,char const *,char const *)\n"
    "    meep::dft_force::load_hdf5(meep::fields &,char const *,char const *)\n"
    "    meep::dft_force::load_hdf5(meep::fields &,char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_dft_force_scale_dfts(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = (meep::dft_force *) 0 ;
  std::complex< double > arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::complex< double > val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_force_scale_dfts", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_force, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_force_scale_dfts" "', argument " "1"" of type '" "meep::dft_force *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_force_scale_dfts" "', argument " "2"" of type '" "std::complex< double >""'");
  } 
  arg2 = static_cast< std::complex< double > >(val2);
  {
    try {
      (arg1)->scale_dfts(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_force_remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = (meep::dft_force *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_force_remove", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_force, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_force_remove" "', argument " "1"" of type '" "meep::dft_force *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  {
    try {
      (arg1)->remove();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_force_freq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = (meep::dft_force *) 0 ;
  std::vector< double,std::allocator< double > > *arg2 = (std::vector< double,std::allocator< double > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_force_freq_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_force, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_force_freq_set" "', argument " "1"" of type '" "meep::dft_force *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_force_freq_set" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > *""'"); 
  }
  arg2 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp2);
  if (arg1) (arg1)->freq = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_force_freq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = (meep::dft_force *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< double,std::allocator< double > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_force_freq_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_force, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_force_freq_get" "', argument " "1"" of type '" "meep::dft_force *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  result = (std::vector< double,std::allocator< double > > *)& ((arg1)->freq);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_force_offdiag1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = (meep::dft_force *) 0 ;
  meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_force_offdiag1_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_force, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_force_offdiag1_set" "', argument " "1"" of type '" "meep::dft_force *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__dft_chunk, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_force_offdiag1_set" "', argument " "2"" of type '" "meep::dft_chunk *""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk * >(argp2);
  if (arg1) (arg1)->offdiag1 = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_force_offdiag1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = (meep::dft_force *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_force_offdiag1_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_force, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_force_offdiag1_get" "', argument " "1"" of type '" "meep::dft_force *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  result = (meep::dft_chunk *) ((arg1)->offdiag1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_force_offdiag2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = (meep::dft_force *) 0 ;
  meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_force_offdiag2_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_force, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_force_offdiag2_set" "', argument " "1"" of type '" "meep::dft_force *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__dft_chunk, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_force_offdiag2_set" "', argument " "2"" of type '" "meep::dft_chunk *""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk * >(argp2);
  if (arg1) (arg1)->offdiag2 = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_force_offdiag2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = (meep::dft_force *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_force_offdiag2_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_force, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_force_offdiag2_get" "', argument " "1"" of type '" "meep::dft_force *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  result = (meep::dft_chunk *) ((arg1)->offdiag2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_force_diag_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = (meep::dft_force *) 0 ;
  meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_force_diag_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_force, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_force_diag_set" "', argument " "1"" of type '" "meep::dft_force *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__dft_chunk, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_force_diag_set" "', argument " "2"" of type '" "meep::dft_chunk *""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk * >(argp2);
  if (arg1) (arg1)->diag = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_force_diag_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = (meep::dft_force *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_force_diag_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_force, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_force_diag_get" "', argument " "1"" of type '" "meep::dft_force *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  result = (meep::dft_chunk *) ((arg1)->diag);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_force_where_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = (meep::dft_force *) 0 ;
  meep::volume *arg2 = (meep::volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_force_where_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_force, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_force_where_set" "', argument " "1"" of type '" "meep::dft_force *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_force_where_set" "', argument " "2"" of type '" "meep::volume *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  if (arg1) (arg1)->where = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_force_where_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = (meep::dft_force *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::volume *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_force_where_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_force, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_force_where_get" "', argument " "1"" of type '" "meep::dft_force *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  result = (meep::volume *)& ((arg1)->where);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__volume, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_dft_force(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_force *arg1 = (meep::dft_force *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_dft_force", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_force, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_dft_force" "', argument " "1"" of type '" "meep::dft_force *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_force * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *dft_force_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__dft_force, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *dft_force_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_sourcedata_near_fd_comp_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::sourcedata *arg1 = (meep::sourcedata *) 0 ;
  meep::component arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "sourcedata_near_fd_comp_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__sourcedata, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sourcedata_near_fd_comp_set" "', argument " "1"" of type '" "meep::sourcedata *""'"); 
  }
  arg1 = reinterpret_cast< meep::sourcedata * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  if (arg1) (arg1)->near_fd_comp = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sourcedata_near_fd_comp_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::sourcedata *arg1 = (meep::sourcedata *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::component result;
  
  if (!PyArg_UnpackTuple(args, "sourcedata_near_fd_comp_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__sourcedata, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sourcedata_near_fd_comp_get" "', argument " "1"" of type '" "meep::sourcedata *""'"); 
  }
  arg1 = reinterpret_cast< meep::sourcedata * >(argp1);
  result = (meep::component) ((arg1)->near_fd_comp);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sourcedata_idx_arr_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::sourcedata *arg1 = (meep::sourcedata *) 0 ;
  std::vector< ptrdiff_t,std::allocator< ptrdiff_t > > *arg2 = (std::vector< ptrdiff_t,std::allocator< ptrdiff_t > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "sourcedata_idx_arr_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__sourcedata, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sourcedata_idx_arr_set" "', argument " "1"" of type '" "meep::sourcedata *""'"); 
  }
  arg1 = reinterpret_cast< meep::sourcedata * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_ptrdiff_t_std__allocatorT_ptrdiff_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sourcedata_idx_arr_set" "', argument " "2"" of type '" "std::vector< ptrdiff_t,std::allocator< ptrdiff_t > > *""'"); 
  }
  arg2 = reinterpret_cast< std::vector< ptrdiff_t,std::allocator< ptrdiff_t > > * >(argp2);
  if (arg1) (arg1)->idx_arr = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sourcedata_idx_arr_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::sourcedata *arg1 = (meep::sourcedata *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< ptrdiff_t,std::allocator< ptrdiff_t > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "sourcedata_idx_arr_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__sourcedata, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sourcedata_idx_arr_get" "', argument " "1"" of type '" "meep::sourcedata *""'"); 
  }
  arg1 = reinterpret_cast< meep::sourcedata * >(argp1);
  result = (std::vector< ptrdiff_t,std::allocator< ptrdiff_t > > *)& ((arg1)->idx_arr);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_ptrdiff_t_std__allocatorT_ptrdiff_t_t_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sourcedata_fc_idx_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::sourcedata *arg1 = (meep::sourcedata *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "sourcedata_fc_idx_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__sourcedata, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sourcedata_fc_idx_set" "', argument " "1"" of type '" "meep::sourcedata *""'"); 
  }
  arg1 = reinterpret_cast< meep::sourcedata * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sourcedata_fc_idx_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  if (arg1) (arg1)->fc_idx = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sourcedata_fc_idx_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::sourcedata *arg1 = (meep::sourcedata *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "sourcedata_fc_idx_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__sourcedata, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sourcedata_fc_idx_get" "', argument " "1"" of type '" "meep::sourcedata *""'"); 
  }
  arg1 = reinterpret_cast< meep::sourcedata * >(argp1);
  result = (int) ((arg1)->fc_idx);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sourcedata_amp_arr_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::sourcedata *arg1 = (meep::sourcedata *) 0 ;
  std::vector< std::complex< double >,std::allocator< std::complex< double > > > *arg2 = (std::vector< std::complex< double >,std::allocator< std::complex< double > > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "sourcedata_amp_arr_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__sourcedata, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sourcedata_amp_arr_set" "', argument " "1"" of type '" "meep::sourcedata *""'"); 
  }
  arg1 = reinterpret_cast< meep::sourcedata * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sourcedata_amp_arr_set" "', argument " "2"" of type '" "std::vector< std::complex< double >,std::allocator< std::complex< double > > > *""'"); 
  }
  arg2 = reinterpret_cast< std::vector< std::complex< double >,std::allocator< std::complex< double > > > * >(argp2);
  if (arg1) (arg1)->amp_arr = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sourcedata_amp_arr_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::sourcedata *arg1 = (meep::sourcedata *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< std::complex< double >,std::allocator< std::complex< double > > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "sourcedata_amp_arr_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__sourcedata, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sourcedata_amp_arr_get" "', argument " "1"" of type '" "meep::sourcedata *""'"); 
  }
  arg1 = reinterpret_cast< meep::sourcedata * >(argp1);
  result = (std::vector< std::complex< double >,std::allocator< std::complex< double > > > *)& ((arg1)->amp_arr);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_sourcedata(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::sourcedata *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_sourcedata", 0, 0)) SWIG_fail;
  {
    try {
      result = (meep::sourcedata *)new meep::sourcedata();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__sourcedata, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_sourcedata(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::sourcedata *arg1 = (meep::sourcedata *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_sourcedata", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__sourcedata, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_sourcedata" "', argument " "1"" of type '" "meep::sourcedata *""'"); 
  }
  arg1 = reinterpret_cast< meep::sourcedata * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *sourcedata_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__sourcedata, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *sourcedata_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_dft_near2far__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  double arg2 ;
  double arg3 ;
  int arg4 ;
  double arg5 ;
  double arg6 ;
  meep::volume *arg7 = 0 ;
  meep::direction *arg8 ;
  int *arg9 ;
  double *arg10 ;
  double *arg11 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  void *argp11 = 0 ;
  int res11 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  meep::dft_near2far *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_dft_near2far", 11, 11, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_dft_near2far" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_dft_near2far" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_dft_near2far" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_dft_near2far" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_dft_near2far" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_dft_near2far" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_dft_near2far" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_near2far" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  arg7 = reinterpret_cast< meep::volume * >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_meep__direction, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_dft_near2far" "', argument " "8"" of type '" "meep::direction const [2]""'"); 
  } 
  arg8 = reinterpret_cast< meep::direction * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_dft_near2far" "', argument " "9"" of type '" "int const [2]""'"); 
  } 
  arg9 = reinterpret_cast< int * >(argp9);
  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_dft_near2far" "', argument " "10"" of type '" "double const [2]""'"); 
  } 
  arg10 = reinterpret_cast< double * >(argp10);
  res11 = SWIG_ConvertPtr(obj10, &argp11,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res11)) {
    SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_dft_near2far" "', argument " "11"" of type '" "double const [2]""'"); 
  } 
  arg11 = reinterpret_cast< double * >(argp11);
  {
    try {
      result = (meep::dft_near2far *)new meep::dft_near2far(arg1,arg2,arg3,arg4,arg5,arg6,(meep::volume const &)*arg7,(meep::direction const (*))arg8,(int const (*))arg9,(double const (*))arg10,(double const (*))arg11);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_near2far, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_dft_near2far__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  std::vector< double,std::allocator< double > > *arg2 = 0 ;
  double arg3 ;
  double arg4 ;
  meep::volume *arg5 = 0 ;
  meep::direction *arg6 ;
  int *arg7 ;
  double *arg8 ;
  double *arg9 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  meep::dft_near2far *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_dft_near2far", 9, 9, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_dft_near2far" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res2 = swig::asptr(obj1, &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_dft_near2far" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_near2far" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg2 = ptr;
  }
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_dft_near2far" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_dft_near2far" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_dft_near2far" "', argument " "5"" of type '" "meep::volume const &""'"); 
  }
  if (!argp5) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_near2far" "', argument " "5"" of type '" "meep::volume const &""'"); 
  }
  arg5 = reinterpret_cast< meep::volume * >(argp5);
  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_meep__direction, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_dft_near2far" "', argument " "6"" of type '" "meep::direction const [2]""'"); 
  } 
  arg6 = reinterpret_cast< meep::direction * >(argp6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_dft_near2far" "', argument " "7"" of type '" "int const [2]""'"); 
  } 
  arg7 = reinterpret_cast< int * >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_dft_near2far" "', argument " "8"" of type '" "double const [2]""'"); 
  } 
  arg8 = reinterpret_cast< double * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_dft_near2far" "', argument " "9"" of type '" "double const [2]""'"); 
  } 
  arg9 = reinterpret_cast< double * >(argp9);
  {
    try {
      result = (meep::dft_near2far *)new meep::dft_near2far(arg1,(std::vector< double,std::allocator< double > > const &)*arg2,arg3,arg4,(meep::volume const &)*arg5,(meep::direction const (*))arg6,(int const (*))arg7,(double const (*))arg8,(double const (*))arg9);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_near2far, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_dft_near2far__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  double *arg2 = (double *) 0 ;
  size_t arg3 ;
  double arg4 ;
  double arg5 ;
  meep::volume *arg6 = 0 ;
  meep::direction *arg7 ;
  int *arg8 ;
  double *arg9 ;
  double *arg10 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  size_t val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  meep::dft_near2far *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_dft_near2far", 10, 10, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_dft_near2far" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_dft_near2far" "', argument " "2"" of type '" "double const *""'"); 
  }
  arg2 = reinterpret_cast< double * >(argp2);
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_dft_near2far" "', argument " "3"" of type '" "size_t""'");
  } 
  arg3 = static_cast< size_t >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_dft_near2far" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_dft_near2far" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_dft_near2far" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  if (!argp6) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_near2far" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  arg6 = reinterpret_cast< meep::volume * >(argp6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_meep__direction, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_dft_near2far" "', argument " "7"" of type '" "meep::direction const [2]""'"); 
  } 
  arg7 = reinterpret_cast< meep::direction * >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_dft_near2far" "', argument " "8"" of type '" "int const [2]""'"); 
  } 
  arg8 = reinterpret_cast< int * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "new_dft_near2far" "', argument " "9"" of type '" "double const [2]""'"); 
  } 
  arg9 = reinterpret_cast< double * >(argp9);
  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "new_dft_near2far" "', argument " "10"" of type '" "double const [2]""'"); 
  } 
  arg10 = reinterpret_cast< double * >(argp10);
  {
    try {
      result = (meep::dft_near2far *)new meep::dft_near2far(arg1,(double const *)arg2,arg3,arg4,arg5,(meep::volume const &)*arg6,(meep::direction const (*))arg7,(int const (*))arg8,(double const (*))arg9,(double const (*))arg10);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_near2far, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_dft_near2far__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::dft_near2far *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_dft_near2far", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__dft_near2far,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_dft_near2far" "', argument " "1"" of type '" "meep::dft_near2far const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_near2far" "', argument " "1"" of type '" "meep::dft_near2far const &""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  {
    try {
      result = (meep::dft_near2far *)new meep::dft_near2far((meep::dft_near2far const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_near2far, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_dft_near2far(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[12] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 11) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__dft_near2far, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_dft_near2far__SWIG_3(self, args);
    }
  }
  if (argc == 9) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = swig::asptr(argv[1], (std::vector< double,std::allocator< double > >**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            int res = SWIG_ConvertPtr(argv[4], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              void *vptr = 0;
              int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_meep__direction, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_int, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_double, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_double, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      return _wrap_new_dft_near2far__SWIG_1(self, args);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 10) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_double, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_size_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              int res = SWIG_ConvertPtr(argv[5], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_meep__direction, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_int, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_double, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      void *vptr = 0;
                      int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_double, 0);
                      _v = SWIG_CheckState(res);
                      if (_v) {
                        return _wrap_new_dft_near2far__SWIG_2(self, args);
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 11) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                int res = SWIG_ConvertPtr(argv[6], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_meep__direction, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_int, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      void *vptr = 0;
                      int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_double, 0);
                      _v = SWIG_CheckState(res);
                      if (_v) {
                        void *vptr = 0;
                        int res = SWIG_ConvertPtr(argv[10], &vptr, SWIGTYPE_p_double, 0);
                        _v = SWIG_CheckState(res);
                        if (_v) {
                          return _wrap_new_dft_near2far__SWIG_0(self, args);
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_dft_near2far'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::dft_near2far::dft_near2far(meep::dft_chunk *,double,double,int,double,double,meep::volume const &,meep::direction const [2],int const [2],double const [2],double const [2])\n"
    "    meep::dft_near2far::dft_near2far(meep::dft_chunk *,std::vector< double,std::allocator< double > > const &,double,double,meep::volume const &,meep::direction const [2],int const [2],double const [2],double const [2])\n"
    "    meep::dft_near2far::dft_near2far(meep::dft_chunk *,double const *,size_t,double,double,meep::volume const &,meep::direction const [2],int const [2],double const [2],double const [2])\n"
    "    meep::dft_near2far::dft_near2far(meep::dft_near2far const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_dft_near2far_farfield(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::complex< double > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_farfield", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_farfield" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_near2far_farfield" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_near2far_farfield" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = (std::complex< double > *)(arg1)->farfield((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_farfield_lowlevel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  std::complex< double > *arg2 = (std::complex< double > *) 0 ;
  meep::vec *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_farfield_lowlevel", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_farfield_lowlevel" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_near2far_farfield_lowlevel" "', argument " "2"" of type '" "std::complex< double > *""'"); 
  }
  arg2 = reinterpret_cast< std::complex< double > * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_near2far_farfield_lowlevel" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_near2far_farfield_lowlevel" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  {
    try {
      (arg1)->farfield_lowlevel(arg2,(meep::vec const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_get_farfields_array(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  meep::volume *arg2 = 0 ;
  int *arg3 = 0 ;
  size_t *arg4 = (size_t *) 0 ;
  size_t *arg5 = 0 ;
  double arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  double *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_get_farfields_array", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_get_farfields_array" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_near2far_get_farfields_array" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_near2far_get_farfields_array" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_int,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_near2far_get_farfields_array" "', argument " "3"" of type '" "int &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_near2far_get_farfields_array" "', argument " "3"" of type '" "int &""'"); 
  }
  arg3 = reinterpret_cast< int * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dft_near2far_get_farfields_array" "', argument " "4"" of type '" "size_t *""'"); 
  }
  arg4 = reinterpret_cast< size_t * >(argp4);
  res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_size_t,  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "dft_near2far_get_farfields_array" "', argument " "5"" of type '" "size_t &""'"); 
  }
  if (!argp5) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_near2far_get_farfields_array" "', argument " "5"" of type '" "size_t &""'"); 
  }
  arg5 = reinterpret_cast< size_t * >(argp5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "dft_near2far_get_farfields_array" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  {
    try {
      result = (double *)(arg1)->get_farfields_array((meep::volume const &)*arg2,*arg3,arg4,*arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_save_farfields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  meep::volume *arg4 = 0 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_save_farfields", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_save_farfields" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_near2far_save_farfields" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_near2far_save_farfields" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dft_near2far_save_farfields" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_near2far_save_farfields" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  arg4 = reinterpret_cast< meep::volume * >(argp4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "dft_near2far_save_farfields" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      (arg1)->save_farfields((char const *)arg2,(char const *)arg3,(meep::volume const &)*arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_flux(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  double arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  double *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_flux", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_flux" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_near2far_flux" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_near2far_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_near2far_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "dft_near2far_flux" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  {
    try {
      result = (double *)(arg1)->flux(arg2,(meep::volume const &)*arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    int size = arg1->freq.size();
    resultobj = PyList_New(size);
    for(int i = 0; i < size; i++) {
      PyList_SetItem(resultobj, i, PyFloat_FromDouble(result[i]));
    }
    
    delete[] result;
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_save_hdf5__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  meep::h5file *arg2 = (meep::h5file *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_save_hdf5", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_save_hdf5" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_near2far_save_hdf5" "', argument " "2"" of type '" "meep::h5file *""'"); 
  }
  arg2 = reinterpret_cast< meep::h5file * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_near2far_save_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try {
      (arg1)->save_hdf5(arg2,(char const *)arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_save_hdf5__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  meep::h5file *arg2 = (meep::h5file *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_save_hdf5", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_save_hdf5" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_near2far_save_hdf5" "', argument " "2"" of type '" "meep::h5file *""'"); 
  }
  arg2 = reinterpret_cast< meep::h5file * >(argp2);
  {
    try {
      (arg1)->save_hdf5(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_load_hdf5__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  meep::h5file *arg2 = (meep::h5file *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_load_hdf5", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_load_hdf5" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_near2far_load_hdf5" "', argument " "2"" of type '" "meep::h5file *""'"); 
  }
  arg2 = reinterpret_cast< meep::h5file * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_near2far_load_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try {
      (arg1)->load_hdf5(arg2,(char const *)arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_load_hdf5__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  meep::h5file *arg2 = (meep::h5file *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_load_hdf5", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_load_hdf5" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_near2far_load_hdf5" "', argument " "2"" of type '" "meep::h5file *""'"); 
  }
  arg2 = reinterpret_cast< meep::h5file * >(argp2);
  {
    try {
      (arg1)->load_hdf5(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  meep::dft_near2far *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far___isub__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far___isub__" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_near2far,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_near2far___isub__" "', argument " "2"" of type '" "meep::dft_near2far const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_near2far___isub__" "', argument " "2"" of type '" "meep::dft_near2far const &""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_near2far * >(argp2);
  {
    try {
      (arg1)->operator -=((meep::dft_near2far const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_save_hdf5__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  meep::fields *arg2 = 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  char *arg5 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  int res5 ;
  char *buf5 = 0 ;
  int alloc5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_save_hdf5", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_save_hdf5" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_near2far_save_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_near2far_save_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_near2far_save_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dft_near2far_save_hdf5" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "dft_near2far_save_hdf5" "', argument " "5"" of type '" "char const *""'");
  }
  arg5 = reinterpret_cast< char * >(buf5);
  {
    try {
      (arg1)->save_hdf5(*arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_save_hdf5__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  meep::fields *arg2 = 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_save_hdf5", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_save_hdf5" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_near2far_save_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_near2far_save_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_near2far_save_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dft_near2far_save_hdf5" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  {
    try {
      (arg1)->save_hdf5(*arg2,(char const *)arg3,(char const *)arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_save_hdf5__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  meep::fields *arg2 = 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_save_hdf5", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_save_hdf5" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_near2far_save_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_near2far_save_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_near2far_save_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try {
      (arg1)->save_hdf5(*arg2,(char const *)arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_save_hdf5(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_near2far, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__h5file, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_dft_near2far_save_hdf5__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_near2far, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__h5file, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_dft_near2far_save_hdf5__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_near2far, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_dft_near2far_save_hdf5__SWIG_4(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_near2far, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_dft_near2far_save_hdf5__SWIG_3(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_near2far, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            int res = SWIG_AsCharPtrAndSize(argv[4], 0, NULL, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_dft_near2far_save_hdf5__SWIG_2(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'dft_near2far_save_hdf5'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::dft_near2far::save_hdf5(meep::h5file *,char const *)\n"
    "    meep::dft_near2far::save_hdf5(meep::h5file *)\n"
    "    meep::dft_near2far::save_hdf5(meep::fields &,char const *,char const *,char const *)\n"
    "    meep::dft_near2far::save_hdf5(meep::fields &,char const *,char const *)\n"
    "    meep::dft_near2far::save_hdf5(meep::fields &,char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_dft_near2far_load_hdf5__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  meep::fields *arg2 = 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  char *arg5 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  int res5 ;
  char *buf5 = 0 ;
  int alloc5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_load_hdf5", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_load_hdf5" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_near2far_load_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_near2far_load_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_near2far_load_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dft_near2far_load_hdf5" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "dft_near2far_load_hdf5" "', argument " "5"" of type '" "char const *""'");
  }
  arg5 = reinterpret_cast< char * >(buf5);
  {
    try {
      (arg1)->load_hdf5(*arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_load_hdf5__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  meep::fields *arg2 = 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_load_hdf5", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_load_hdf5" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_near2far_load_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_near2far_load_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_near2far_load_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dft_near2far_load_hdf5" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  {
    try {
      (arg1)->load_hdf5(*arg2,(char const *)arg3,(char const *)arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_load_hdf5__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  meep::fields *arg2 = 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_load_hdf5", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_load_hdf5" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_near2far_load_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_near2far_load_hdf5" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dft_near2far_load_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try {
      (arg1)->load_hdf5(*arg2,(char const *)arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_load_hdf5(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_near2far, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__h5file, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_dft_near2far_load_hdf5__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_near2far, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__h5file, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_dft_near2far_load_hdf5__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_near2far, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_dft_near2far_load_hdf5__SWIG_4(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_near2far, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_dft_near2far_load_hdf5__SWIG_3(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_near2far, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            int res = SWIG_AsCharPtrAndSize(argv[4], 0, NULL, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_dft_near2far_load_hdf5__SWIG_2(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'dft_near2far_load_hdf5'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::dft_near2far::load_hdf5(meep::h5file *,char const *)\n"
    "    meep::dft_near2far::load_hdf5(meep::h5file *)\n"
    "    meep::dft_near2far::load_hdf5(meep::fields &,char const *,char const *,char const *)\n"
    "    meep::dft_near2far::load_hdf5(meep::fields &,char const *,char const *)\n"
    "    meep::dft_near2far::load_hdf5(meep::fields &,char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_dft_near2far_scale_dfts(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  std::complex< double > arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::complex< double > val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_scale_dfts", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_scale_dfts" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_near2far_scale_dfts" "', argument " "2"" of type '" "std::complex< double >""'");
  } 
  arg2 = static_cast< std::complex< double > >(val2);
  {
    try {
      (arg1)->scale_dfts(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_remove", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_remove" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  {
    try {
      (arg1)->remove();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_freq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  std::vector< double,std::allocator< double > > *arg2 = (std::vector< double,std::allocator< double > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_freq_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_freq_set" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_near2far_freq_set" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > *""'"); 
  }
  arg2 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp2);
  if (arg1) (arg1)->freq = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_freq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< double,std::allocator< double > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_freq_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_freq_get" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  result = (std::vector< double,std::allocator< double > > *)& ((arg1)->freq);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_F_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_F_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_F_set" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__dft_chunk, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_near2far_F_set" "', argument " "2"" of type '" "meep::dft_chunk *""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk * >(argp2);
  if (arg1) (arg1)->F = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_F_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_F_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_F_get" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  result = (meep::dft_chunk *) ((arg1)->F);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_eps_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_eps_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_eps_set" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_near2far_eps_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->eps = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_eps_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_eps_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_eps_get" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  result = (double) ((arg1)->eps);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_mu_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_mu_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_mu_set" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_near2far_mu_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->mu = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_mu_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_mu_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_mu_get" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  result = (double) ((arg1)->mu);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_where_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  meep::volume *arg2 = (meep::volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_where_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_where_set" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_near2far_where_set" "', argument " "2"" of type '" "meep::volume *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  if (arg1) (arg1)->where = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_where_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::volume *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_where_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_where_get" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  result = (meep::volume *)& ((arg1)->where);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__volume, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_periodic_d_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  meep::direction *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_periodic_d_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_periodic_d_set" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__direction, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_near2far_periodic_d_set" "', argument " "2"" of type '" "meep::direction [2]""'"); 
  } 
  arg2 = reinterpret_cast< meep::direction * >(argp2);
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)2; ++ii) *(meep::direction *)&arg1->periodic_d[ii] = *((meep::direction *)arg2 + ii);
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""periodic_d""' of type '""meep::direction [2]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_periodic_d_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::direction *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_periodic_d_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_periodic_d_get" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  result = (meep::direction *)(meep::direction *) ((arg1)->periodic_d);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__direction, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_periodic_n_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  int *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_periodic_n_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_periodic_n_set" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_near2far_periodic_n_set" "', argument " "2"" of type '" "int [2]""'"); 
  } 
  arg2 = reinterpret_cast< int * >(argp2);
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)2; ++ii) *(int *)&arg1->periodic_n[ii] = *((int *)arg2 + ii);
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""periodic_n""' of type '""int [2]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_periodic_n_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_periodic_n_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_periodic_n_get" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  result = (int *)(int *) ((arg1)->periodic_n);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_periodic_k_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  double *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_periodic_k_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_periodic_k_set" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_near2far_periodic_k_set" "', argument " "2"" of type '" "double [2]""'"); 
  } 
  arg2 = reinterpret_cast< double * >(argp2);
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)2; ++ii) *(double *)&arg1->periodic_k[ii] = *((double *)arg2 + ii);
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""periodic_k""' of type '""double [2]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_periodic_k_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_periodic_k_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_periodic_k_get" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  result = (double *)(double *) ((arg1)->periodic_k);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_period_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  double *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_period_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_period_set" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_near2far_period_set" "', argument " "2"" of type '" "double [2]""'"); 
  } 
  arg2 = reinterpret_cast< double * >(argp2);
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)2; ++ii) *(double *)&arg1->period[ii] = *((double *)arg2 + ii);
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""period""' of type '""double [2]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_period_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_period_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_period_get" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  result = (double *)(double *) ((arg1)->period);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_near2far_near_sourcedata(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  meep::vec *arg2 = 0 ;
  double *arg3 = (double *) 0 ;
  size_t arg4 ;
  std::complex< double > *arg5 = (std::complex< double > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > result;
  
  if (!PyArg_UnpackTuple(args, "dft_near2far_near_sourcedata", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_near2far_near_sourcedata" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_near2far_near_sourcedata" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_near2far_near_sourcedata" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    arg3 = (double *)array_data(obj2);
  }
  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "dft_near2far_near_sourcedata" "', argument " "4"" of type '" "size_t""'");
  } 
  arg4 = static_cast< size_t >(val4);
  {
    arg5 = (std::complex<double> *)array_data(obj4);
  }
  {
    try {
      result = (arg1)->near_sourcedata((meep::vec const &)*arg2,arg3,arg4,(std::complex< double > const *)arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >(static_cast< const std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >& >(result))), SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_dft_near2far(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_near2far *arg1 = (meep::dft_near2far *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_dft_near2far", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_near2far, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_dft_near2far" "', argument " "1"" of type '" "meep::dft_near2far *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_near2far * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *dft_near2far_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__dft_near2far, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *dft_near2far_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new__dft_ldos__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  int arg3 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::dft_ldos *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new__dft_ldos", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new__dft_ldos" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new__dft_ldos" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new__dft_ldos" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      result = (meep::dft_ldos *)new meep::dft_ldos(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_ldos, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new__dft_ldos__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< double,std::allocator< double > > arg1 ;
  PyObject * obj0 = 0 ;
  meep::dft_ldos *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new__dft_ldos", 1, 1, &obj0)) SWIG_fail;
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    int res = swig::asptr(obj0, &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new__dft_ldos" "', argument " "1"" of type '" "std::vector< double,std::allocator< double > > const""'"); 
    }
    arg1 = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  {
    try {
      result = (meep::dft_ldos *)new meep::dft_ldos(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_ldos, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new__dft_ldos__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::dft_ldos *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new__dft_ldos", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new__dft_ldos" "', argument " "1"" of type '" "double const *""'"); 
  }
  arg1 = reinterpret_cast< double * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new__dft_ldos" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  {
    try {
      result = (meep::dft_ldos *)new meep::dft_ldos((double const *)arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_ldos, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new__dft_ldos(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< double,std::allocator< double > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new__dft_ldos__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_double, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new__dft_ldos__SWIG_2(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new__dft_ldos__SWIG_0(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new__dft_ldos'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::dft_ldos::dft_ldos(double,double,int)\n"
    "    meep::dft_ldos::dft_ldos(std::vector< double,std::allocator< double > > const)\n"
    "    meep::dft_ldos::dft_ldos(double const *,size_t)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_dft_ldos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_ldos *arg1 = (meep::dft_ldos *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_dft_ldos", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_ldos, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_dft_ldos" "', argument " "1"" of type '" "meep::dft_ldos *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_ldos * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_ldos_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_ldos *arg1 = (meep::dft_ldos *) 0 ;
  meep::fields *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_ldos_update", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_ldos, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_ldos_update" "', argument " "1"" of type '" "meep::dft_ldos *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_ldos * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_ldos_update" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_ldos_update" "', argument " "2"" of type '" "meep::fields &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  {
    try {
      (arg1)->update(*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_ldos_ldos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_ldos *arg1 = (meep::dft_ldos *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_ldos_ldos", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_ldos, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_ldos_ldos" "', argument " "1"" of type '" "meep::dft_ldos *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_ldos * >(argp1);
  {
    try {
      result = (double *)(arg1)->ldos();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_ldos_F(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_ldos *arg1 = (meep::dft_ldos *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::complex< double > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_ldos_F", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_ldos, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_ldos_F" "', argument " "1"" of type '" "meep::dft_ldos const *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_ldos * >(argp1);
  {
    try {
      result = (std::complex< double > *)((meep::dft_ldos const *)arg1)->F();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_ldos_J(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_ldos *arg1 = (meep::dft_ldos *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::complex< double > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_ldos_J", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_ldos, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_ldos_J" "', argument " "1"" of type '" "meep::dft_ldos const *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_ldos * >(argp1);
  {
    try {
      result = (std::complex< double > *)((meep::dft_ldos const *)arg1)->J();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_ldos_freq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_ldos *arg1 = (meep::dft_ldos *) 0 ;
  std::vector< double,std::allocator< double > > *arg2 = (std::vector< double,std::allocator< double > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_ldos_freq_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_ldos, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_ldos_freq_set" "', argument " "1"" of type '" "meep::dft_ldos *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_ldos * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_ldos_freq_set" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > *""'"); 
  }
  arg2 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp2);
  if (arg1) (arg1)->freq = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_ldos_freq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_ldos *arg1 = (meep::dft_ldos *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< double,std::allocator< double > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_ldos_freq_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_ldos, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_ldos_freq_get" "', argument " "1"" of type '" "meep::dft_ldos *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_ldos * >(argp1);
  result = (std::vector< double,std::allocator< double > > *)& ((arg1)->freq);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_ldos_overall_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_ldos *arg1 = (meep::dft_ldos *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "dft_ldos_overall_scale", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_ldos, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_ldos_overall_scale" "', argument " "1"" of type '" "meep::dft_ldos const *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_ldos * >(argp1);
  {
    try {
      result = (double)((meep::dft_ldos const *)arg1)->overall_scale();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *dft_ldos_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__dft_ldos, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_dft_fields__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  double arg2 ;
  double arg3 ;
  int arg4 ;
  meep::volume *arg5 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  meep::dft_fields *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_dft_fields", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_dft_fields" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_dft_fields" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_dft_fields" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_dft_fields" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_dft_fields" "', argument " "5"" of type '" "meep::volume const &""'"); 
  }
  if (!argp5) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_fields" "', argument " "5"" of type '" "meep::volume const &""'"); 
  }
  arg5 = reinterpret_cast< meep::volume * >(argp5);
  {
    try {
      result = (meep::dft_fields *)new meep::dft_fields(arg1,arg2,arg3,arg4,(meep::volume const &)*arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_fields, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_dft_fields__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  std::vector< double,std::allocator< double > > *arg2 = 0 ;
  meep::volume *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::dft_fields *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_dft_fields", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_dft_fields" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res2 = swig::asptr(obj1, &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_dft_fields" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_fields" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg2 = ptr;
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_dft_fields" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_fields" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    try {
      result = (meep::dft_fields *)new meep::dft_fields(arg1,(std::vector< double,std::allocator< double > > const &)*arg2,(meep::volume const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_fields, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_dft_fields__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_chunk *arg1 = (meep::dft_chunk *) 0 ;
  double *arg2 = (double *) 0 ;
  size_t arg3 ;
  meep::volume *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  size_t val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::dft_fields *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_dft_fields", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_dft_fields" "', argument " "1"" of type '" "meep::dft_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_chunk * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_dft_fields" "', argument " "2"" of type '" "double const *""'"); 
  }
  arg2 = reinterpret_cast< double * >(argp2);
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_dft_fields" "', argument " "3"" of type '" "size_t""'");
  } 
  arg3 = static_cast< size_t >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_dft_fields" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_dft_fields" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  arg4 = reinterpret_cast< meep::volume * >(argp4);
  {
    try {
      result = (meep::dft_fields *)new meep::dft_fields(arg1,(double const *)arg2,arg3,(meep::volume const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_fields, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_dft_fields(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = swig::asptr(argv[1], (std::vector< double,std::allocator< double > >**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_new_dft_fields__SWIG_1(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_double, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_size_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_new_dft_fields__SWIG_2(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            int res = SWIG_ConvertPtr(argv[4], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_new_dft_fields__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_dft_fields'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::dft_fields::dft_fields(meep::dft_chunk *,double,double,int,meep::volume const &)\n"
    "    meep::dft_fields::dft_fields(meep::dft_chunk *,std::vector< double,std::allocator< double > > const &,meep::volume const &)\n"
    "    meep::dft_fields::dft_fields(meep::dft_chunk *,double const *,size_t,meep::volume const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_dft_fields_fourier_sourcedata(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_fields *arg1 = (meep::dft_fields *) 0 ;
  meep::volume *arg2 = 0 ;
  meep::component arg3 ;
  meep::fields *arg4 = 0 ;
  std::complex< double > *arg5 = (std::complex< double > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > result;
  
  if (!PyArg_UnpackTuple(args, "dft_fields_fourier_sourcedata", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_fields_fourier_sourcedata" "', argument " "1"" of type '" "meep::dft_fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_fields_fourier_sourcedata" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_fields_fourier_sourcedata" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    arg3 = static_cast<meep::component>(PyInteger_AsLong(obj2));
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__fields,  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dft_fields_fourier_sourcedata" "', argument " "4"" of type '" "meep::fields &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dft_fields_fourier_sourcedata" "', argument " "4"" of type '" "meep::fields &""'"); 
  }
  arg4 = reinterpret_cast< meep::fields * >(argp4);
  {
    arg5 = (std::complex<double> *)array_data(obj4);
  }
  {
    try {
      result = (arg1)->fourier_sourcedata((meep::volume const &)*arg2,arg3,*arg4,(std::complex< double > const *)arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >(static_cast< const std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >& >(result))), SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_fields_scale_dfts(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_fields *arg1 = (meep::dft_fields *) 0 ;
  std::complex< double > arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::complex< double > val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_fields_scale_dfts", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_fields_scale_dfts" "', argument " "1"" of type '" "meep::dft_fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_fields * >(argp1);
  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_fields_scale_dfts" "', argument " "2"" of type '" "std::complex< double >""'");
  } 
  arg2 = static_cast< std::complex< double > >(val2);
  {
    try {
      (arg1)->scale_dfts(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_fields_remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_fields *arg1 = (meep::dft_fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_fields_remove", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_fields_remove" "', argument " "1"" of type '" "meep::dft_fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_fields * >(argp1);
  {
    try {
      (arg1)->remove();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_fields_freq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_fields *arg1 = (meep::dft_fields *) 0 ;
  std::vector< double,std::allocator< double > > *arg2 = (std::vector< double,std::allocator< double > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_fields_freq_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_fields_freq_set" "', argument " "1"" of type '" "meep::dft_fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_fields_freq_set" "', argument " "2"" of type '" "std::vector< double,std::allocator< double > > *""'"); 
  }
  arg2 = reinterpret_cast< std::vector< double,std::allocator< double > > * >(argp2);
  if (arg1) (arg1)->freq = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_fields_freq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_fields *arg1 = (meep::dft_fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< double,std::allocator< double > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_fields_freq_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_fields_freq_get" "', argument " "1"" of type '" "meep::dft_fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_fields * >(argp1);
  result = (std::vector< double,std::allocator< double > > *)& ((arg1)->freq);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_std__allocatorT_double_t_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_fields_chunks_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_fields *arg1 = (meep::dft_fields *) 0 ;
  meep::dft_chunk *arg2 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_fields_chunks_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_fields_chunks_set" "', argument " "1"" of type '" "meep::dft_fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__dft_chunk, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_fields_chunks_set" "', argument " "2"" of type '" "meep::dft_chunk *""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk * >(argp2);
  if (arg1) (arg1)->chunks = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_fields_chunks_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_fields *arg1 = (meep::dft_fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_fields_chunks_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_fields_chunks_get" "', argument " "1"" of type '" "meep::dft_fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_fields * >(argp1);
  result = (meep::dft_chunk *) ((arg1)->chunks);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_fields_where_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_fields *arg1 = (meep::dft_fields *) 0 ;
  meep::volume *arg2 = (meep::volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_fields_where_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_fields_where_set" "', argument " "1"" of type '" "meep::dft_fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_fields_where_set" "', argument " "2"" of type '" "meep::volume *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  if (arg1) (arg1)->where = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_fields_where_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_fields *arg1 = (meep::dft_fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::volume *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_fields_where_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_fields_where_get" "', argument " "1"" of type '" "meep::dft_fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_fields * >(argp1);
  result = (meep::volume *)& ((arg1)->where);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__volume, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_dft_fields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::dft_fields *arg1 = (meep::dft_fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_dft_fields", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__dft_fields, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_dft_fields" "', argument " "1"" of type '" "meep::dft_fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::dft_fields * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *dft_fields_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__dft_fields, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *dft_fields_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_polarization_state_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::polarization_state_s *arg1 = (meep::polarization_state_s *) 0 ;
  void *arg2 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "polarization_state_data_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__polarization_state_s, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "polarization_state_data_set" "', argument " "1"" of type '" "meep::polarization_state_s *""'"); 
  }
  arg1 = reinterpret_cast< meep::polarization_state_s * >(argp1);
  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "polarization_state_data_set" "', argument " "2"" of type '" "void *""'"); 
  }
  if (arg1) (arg1)->data = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_polarization_state_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::polarization_state_s *arg1 = (meep::polarization_state_s *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "polarization_state_data_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__polarization_state_s, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "polarization_state_data_get" "', argument " "1"" of type '" "meep::polarization_state_s *""'"); 
  }
  arg1 = reinterpret_cast< meep::polarization_state_s * >(argp1);
  result = (void *) ((arg1)->data);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_polarization_state_s_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::polarization_state_s *arg1 = (meep::polarization_state_s *) 0 ;
  meep::susceptibility *arg2 = (meep::susceptibility *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "polarization_state_s_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__polarization_state_s, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "polarization_state_s_set" "', argument " "1"" of type '" "meep::polarization_state_s *""'"); 
  }
  arg1 = reinterpret_cast< meep::polarization_state_s * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__susceptibility, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "polarization_state_s_set" "', argument " "2"" of type '" "meep::susceptibility const *""'"); 
  }
  arg2 = reinterpret_cast< meep::susceptibility * >(argp2);
  if (arg1) (arg1)->s = (meep::susceptibility const *)arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_polarization_state_s_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::polarization_state_s *arg1 = (meep::polarization_state_s *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::susceptibility *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "polarization_state_s_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__polarization_state_s, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "polarization_state_s_get" "', argument " "1"" of type '" "meep::polarization_state_s *""'"); 
  }
  arg1 = reinterpret_cast< meep::polarization_state_s * >(argp1);
  result = (meep::susceptibility *) ((arg1)->s);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__susceptibility, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_polarization_state_next_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::polarization_state_s *arg1 = (meep::polarization_state_s *) 0 ;
  meep::polarization_state_s *arg2 = (meep::polarization_state_s *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "polarization_state_next_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__polarization_state_s, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "polarization_state_next_set" "', argument " "1"" of type '" "meep::polarization_state_s *""'"); 
  }
  arg1 = reinterpret_cast< meep::polarization_state_s * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__polarization_state_s, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "polarization_state_next_set" "', argument " "2"" of type '" "meep::polarization_state_s *""'"); 
  }
  arg2 = reinterpret_cast< meep::polarization_state_s * >(argp2);
  if (arg1) (arg1)->next = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_polarization_state_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::polarization_state_s *arg1 = (meep::polarization_state_s *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::polarization_state_s *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "polarization_state_next_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__polarization_state_s, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "polarization_state_next_get" "', argument " "1"" of type '" "meep::polarization_state_s *""'"); 
  }
  arg1 = reinterpret_cast< meep::polarization_state_s * >(argp1);
  result = (meep::polarization_state_s *) ((arg1)->next);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__polarization_state_s, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_polarization_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::polarization_state_s *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_polarization_state", 0, 0)) SWIG_fail;
  {
    try {
      result = (meep::polarization_state_s *)new meep::polarization_state_s();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__polarization_state_s, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_polarization_state(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::polarization_state_s *arg1 = (meep::polarization_state_s *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_polarization_state", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__polarization_state_s, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_polarization_state" "', argument " "1"" of type '" "meep::polarization_state_s *""'"); 
  }
  arg1 = reinterpret_cast< meep::polarization_state_s * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *polarization_state_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__polarization_state_s, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *polarization_state_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_derived_component_func(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::derived_component arg1 ;
  meep::grid_volume *arg2 = 0 ;
  int *arg3 = 0 ;
  meep::component *arg4 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::field_rfunction result;
  
  if (!PyArg_UnpackTuple(args, "derived_component_func", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  {
    arg1 = static_cast<meep::derived_component>(PyInteger_AsLong(obj0));
  }
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__grid_volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "derived_component_func" "', argument " "2"" of type '" "meep::grid_volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "derived_component_func" "', argument " "2"" of type '" "meep::grid_volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::grid_volume * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_int,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "derived_component_func" "', argument " "3"" of type '" "int &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "derived_component_func" "', argument " "3"" of type '" "int &""'"); 
  }
  arg3 = reinterpret_cast< int * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__component, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "derived_component_func" "', argument " "4"" of type '" "meep::component [12]""'"); 
  } 
  arg4 = reinterpret_cast< meep::component * >(argp4);
  {
    try {
      result = (meep::field_rfunction)meep::derived_component_func(arg1,(meep::grid_volume const &)*arg2,*arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_chunkloop_field_components(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields_chunk *arg1 = (meep::fields_chunk *) 0 ;
  meep::component arg2 ;
  std::complex< double > arg3 ;
  meep::symmetry *arg4 = 0 ;
  int arg5 ;
  int arg6 ;
  meep::component *arg7 = (meep::component *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::complex< double > val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  meep::chunkloop_field_components *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_chunkloop_field_components", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields_chunk, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_chunkloop_field_components" "', argument " "1"" of type '" "meep::fields_chunk *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields_chunk * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_chunkloop_field_components" "', argument " "3"" of type '" "std::complex< double >""'");
  } 
  arg3 = static_cast< std::complex< double > >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__symmetry,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_chunkloop_field_components" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_chunkloop_field_components" "', argument " "4"" of type '" "meep::symmetry const &""'"); 
  }
  arg4 = reinterpret_cast< meep::symmetry * >(argp4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_chunkloop_field_components" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_chunkloop_field_components" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_meep__component, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_chunkloop_field_components" "', argument " "7"" of type '" "meep::component const *""'"); 
  }
  arg7 = reinterpret_cast< meep::component * >(argp7);
  {
    try {
      result = (meep::chunkloop_field_components *)new meep::chunkloop_field_components(arg1,arg2,arg3,(meep::symmetry const &)*arg4,arg5,arg6,(meep::component const *)arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__chunkloop_field_components, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_chunkloop_field_components_update_values(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::chunkloop_field_components *arg1 = (meep::chunkloop_field_components *) 0 ;
  ptrdiff_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "chunkloop_field_components_update_values", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__chunkloop_field_components, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "chunkloop_field_components_update_values" "', argument " "1"" of type '" "meep::chunkloop_field_components *""'"); 
  }
  arg1 = reinterpret_cast< meep::chunkloop_field_components * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "chunkloop_field_components_update_values" "', argument " "2"" of type '" "ptrdiff_t""'");
  } 
  arg2 = static_cast< ptrdiff_t >(val2);
  {
    try {
      (arg1)->update_values(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_chunkloop_field_components_values_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::chunkloop_field_components *arg1 = (meep::chunkloop_field_components *) 0 ;
  std::vector< std::complex< double >,std::allocator< std::complex< double > > > *arg2 = (std::vector< std::complex< double >,std::allocator< std::complex< double > > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "chunkloop_field_components_values_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__chunkloop_field_components, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "chunkloop_field_components_values_set" "', argument " "1"" of type '" "meep::chunkloop_field_components *""'"); 
  }
  arg1 = reinterpret_cast< meep::chunkloop_field_components * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "chunkloop_field_components_values_set" "', argument " "2"" of type '" "std::vector< std::complex< double >,std::allocator< std::complex< double > > > *""'"); 
  }
  arg2 = reinterpret_cast< std::vector< std::complex< double >,std::allocator< std::complex< double > > > * >(argp2);
  if (arg1) (arg1)->values = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_chunkloop_field_components_values_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::chunkloop_field_components *arg1 = (meep::chunkloop_field_components *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< std::complex< double >,std::allocator< std::complex< double > > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "chunkloop_field_components_values_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__chunkloop_field_components, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "chunkloop_field_components_values_get" "', argument " "1"" of type '" "meep::chunkloop_field_components *""'"); 
  }
  arg1 = reinterpret_cast< meep::chunkloop_field_components * >(argp1);
  result = (std::vector< std::complex< double >,std::allocator< std::complex< double > > > *)& ((arg1)->values);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_chunkloop_field_components(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::chunkloop_field_components *arg1 = (meep::chunkloop_field_components *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_chunkloop_field_components", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__chunkloop_field_components, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_chunkloop_field_components" "', argument " "1"" of type '" "meep::chunkloop_field_components *""'"); 
  }
  arg1 = reinterpret_cast< meep::chunkloop_field_components * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *chunkloop_field_components_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__chunkloop_field_components, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *chunkloop_field_components_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_diffractedplanewave(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int *arg1 ;
  double *arg2 ;
  std::complex< double > arg3 ;
  std::complex< double > arg4 ;
  PyArrayObject *array1 = NULL ;
  std::complex< double > val3 ;
  int ecode3 = 0 ;
  std::complex< double > val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::diffractedplanewave *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_diffractedplanewave", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  {
    npy_intp size[1] = {
      3 
    };
    array1 = obj_to_array_no_conversion(obj0, NPY_INT);
    if (!array1 || !require_dimensions(array1,1) || !require_size(array1, size, 1) ||
      !require_contiguous(array1) || !require_native(array1)) SWIG_fail;
    arg1 = (int *) array_data(array1);
  }
  {
    arg2 = (double *)array_data(obj1);
  }
  ecode3 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_diffractedplanewave" "', argument " "3"" of type '" "std::complex< double >""'");
  } 
  arg3 = static_cast< std::complex< double > >(val3);
  ecode4 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_diffractedplanewave" "', argument " "4"" of type '" "std::complex< double >""'");
  } 
  arg4 = static_cast< std::complex< double > >(val4);
  {
    try {
      result = (meep::diffractedplanewave *)new meep::diffractedplanewave(arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__diffractedplanewave, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_diffractedplanewave_get_g(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::diffractedplanewave *arg1 = (meep::diffractedplanewave *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "diffractedplanewave_get_g", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__diffractedplanewave, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "diffractedplanewave_get_g" "', argument " "1"" of type '" "meep::diffractedplanewave *""'"); 
  }
  arg1 = reinterpret_cast< meep::diffractedplanewave * >(argp1);
  {
    try {
      result = (int *)(arg1)->get_g();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_diffractedplanewave_get_axis(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::diffractedplanewave *arg1 = (meep::diffractedplanewave *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "diffractedplanewave_get_axis", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__diffractedplanewave, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "diffractedplanewave_get_axis" "', argument " "1"" of type '" "meep::diffractedplanewave *""'"); 
  }
  arg1 = reinterpret_cast< meep::diffractedplanewave * >(argp1);
  {
    try {
      result = (double *)(arg1)->get_axis();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_diffractedplanewave_get_s(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::diffractedplanewave *arg1 = (meep::diffractedplanewave *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "diffractedplanewave_get_s", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__diffractedplanewave, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "diffractedplanewave_get_s" "', argument " "1"" of type '" "meep::diffractedplanewave const *""'"); 
  }
  arg1 = reinterpret_cast< meep::diffractedplanewave * >(argp1);
  {
    try {
      result = ((meep::diffractedplanewave const *)arg1)->get_s();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_diffractedplanewave_get_p(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::diffractedplanewave *arg1 = (meep::diffractedplanewave *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "diffractedplanewave_get_p", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__diffractedplanewave, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "diffractedplanewave_get_p" "', argument " "1"" of type '" "meep::diffractedplanewave const *""'"); 
  }
  arg1 = reinterpret_cast< meep::diffractedplanewave * >(argp1);
  {
    try {
      result = ((meep::diffractedplanewave const *)arg1)->get_p();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_diffractedplanewave(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::diffractedplanewave *arg1 = (meep::diffractedplanewave *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_diffractedplanewave", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__diffractedplanewave, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_diffractedplanewave" "', argument " "1"" of type '" "meep::diffractedplanewave *""'"); 
  }
  arg1 = reinterpret_cast< meep::diffractedplanewave * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *diffractedplanewave_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__diffractedplanewave, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *diffractedplanewave_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_gaussianbeam(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = 0 ;
  meep::vec *arg2 = 0 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  std::complex< double > *arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  meep::gaussianbeam *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_gaussianbeam", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_gaussianbeam" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_gaussianbeam" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_gaussianbeam" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_gaussianbeam" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_gaussianbeam" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_gaussianbeam" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_gaussianbeam" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_gaussianbeam" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  {
    arg7 = (std::complex<double> *)array_data(obj6);
  }
  {
    try {
      result = (meep::gaussianbeam *)new meep::gaussianbeam((meep::vec const &)*arg1,(meep::vec const &)*arg2,arg3,arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__gaussianbeam, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_gaussianbeam_get_fields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gaussianbeam *arg1 = (meep::gaussianbeam *) 0 ;
  std::complex< double > *arg2 = (std::complex< double > *) 0 ;
  meep::vec *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "gaussianbeam_get_fields", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gaussianbeam, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gaussianbeam_get_fields" "', argument " "1"" of type '" "meep::gaussianbeam const *""'"); 
  }
  arg1 = reinterpret_cast< meep::gaussianbeam * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gaussianbeam_get_fields" "', argument " "2"" of type '" "std::complex< double > *""'"); 
  }
  arg2 = reinterpret_cast< std::complex< double > * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "gaussianbeam_get_fields" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gaussianbeam_get_fields" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  {
    try {
      ((meep::gaussianbeam const *)arg1)->get_fields(arg2,(meep::vec const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_gaussianbeam_get_E0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gaussianbeam *arg1 = (meep::gaussianbeam *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "gaussianbeam_get_E0", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gaussianbeam, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gaussianbeam_get_E0" "', argument " "1"" of type '" "meep::gaussianbeam const *""'"); 
  }
  arg1 = reinterpret_cast< meep::gaussianbeam * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gaussianbeam_get_E0" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      result = ((meep::gaussianbeam const *)arg1)->get_E0(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_gaussianbeam(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::gaussianbeam *arg1 = (meep::gaussianbeam *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_gaussianbeam", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__gaussianbeam, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_gaussianbeam" "', argument " "1"" of type '" "meep::gaussianbeam *""'"); 
  }
  arg1 = reinterpret_cast< meep::gaussianbeam * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *gaussianbeam_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__gaussianbeam, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *gaussianbeam_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_fields_num_chunks_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_num_chunks_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_num_chunks_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_num_chunks_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  if (arg1) (arg1)->num_chunks = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_num_chunks_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "fields_num_chunks_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_num_chunks_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result = (int) ((arg1)->num_chunks);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_shared_chunks_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_shared_chunks_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_shared_chunks_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_bool(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_shared_chunks_set" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  if (arg1) (arg1)->shared_chunks = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_shared_chunks_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "fields_shared_chunks_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_shared_chunks_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result = (bool) ((arg1)->shared_chunks);
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_chunks_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::fields_chunk **arg2 = (meep::fields_chunk **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_chunks_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_chunks_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_meep__fields_chunk, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_chunks_set" "', argument " "2"" of type '" "meep::fields_chunk **""'"); 
  }
  arg2 = reinterpret_cast< meep::fields_chunk ** >(argp2);
  if (arg1) (arg1)->chunks = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_chunks_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::fields_chunk **result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_chunks_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_chunks_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result = (meep::fields_chunk **) ((arg1)->chunks);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_meep__fields_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_sources_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::src_time *arg2 = (meep::src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_sources_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_sources_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__src_time, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_sources_set" "', argument " "2"" of type '" "meep::src_time *""'"); 
  }
  arg2 = reinterpret_cast< meep::src_time * >(argp2);
  if (arg1) (arg1)->sources = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_sources_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_sources_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_sources_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result = (meep::src_time *) ((arg1)->sources);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__src_time, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_fluxes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::flux_vol *arg2 = (meep::flux_vol *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_fluxes_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_fluxes_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__flux_vol, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_fluxes_set" "', argument " "2"" of type '" "meep::flux_vol *""'"); 
  }
  arg2 = reinterpret_cast< meep::flux_vol * >(argp2);
  if (arg1) (arg1)->fluxes = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_fluxes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::flux_vol *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_fluxes_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_fluxes_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result = (meep::flux_vol *) ((arg1)->fluxes);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__flux_vol, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_S_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::symmetry *arg2 = (meep::symmetry *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_S_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_S_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__symmetry, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_S_set" "', argument " "2"" of type '" "meep::symmetry *""'"); 
  }
  arg2 = reinterpret_cast< meep::symmetry * >(argp2);
  if (arg1) (arg1)->S = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_S_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::symmetry *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_S_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_S_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result = (meep::symmetry *)& ((arg1)->S);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__symmetry, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_a_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_a_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_a_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_a_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->a = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_a_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_a_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_a_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result = (double) ((arg1)->a);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_dt_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_dt_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_dt_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_dt_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->dt = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_dt_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_dt_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_dt_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result = (double) ((arg1)->dt);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_gv_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::grid_volume *arg2 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_gv_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_gv_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_gv_set" "', argument " "2"" of type '" "meep::grid_volume *""'"); 
  }
  arg2 = reinterpret_cast< meep::grid_volume * >(argp2);
  if (arg1) (arg1)->gv = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_gv_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::grid_volume *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_gv_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_gv_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result = (meep::grid_volume *)& ((arg1)->gv);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_user_volume_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::grid_volume *arg2 = (meep::grid_volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_user_volume_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_user_volume_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_user_volume_set" "', argument " "2"" of type '" "meep::grid_volume *""'"); 
  }
  arg2 = reinterpret_cast< meep::grid_volume * >(argp2);
  if (arg1) (arg1)->user_volume = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_user_volume_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::grid_volume *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_user_volume_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_user_volume_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result = (meep::grid_volume *)& ((arg1)->user_volume);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_v_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = (meep::volume *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_v_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_v_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_v_set" "', argument " "2"" of type '" "meep::volume *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  if (arg1) (arg1)->v = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_v_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::volume *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_v_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_v_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result = (meep::volume *)& ((arg1)->v);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__volume, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_m_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_m_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_m_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_m_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->m = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_m_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_m_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_m_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result = (double) ((arg1)->m);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_beta_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_beta_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_beta_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_beta_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->beta = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_beta_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_beta_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_beta_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result = (double) ((arg1)->beta);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_t_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_t_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_t_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_t_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  if (arg1) (arg1)->t = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_t_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "fields_t_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_t_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result = (int) ((arg1)->t);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_phasein_time_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_phasein_time_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_phasein_time_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_phasein_time_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  if (arg1) (arg1)->phasein_time = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_phasein_time_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "fields_phasein_time_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_phasein_time_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result = (int) ((arg1)->phasein_time);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_is_real_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_is_real_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_is_real_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_is_real_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  if (arg1) (arg1)->is_real = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_is_real_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "fields_is_real_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_is_real_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result = (int) ((arg1)->is_real);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_k_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  std::complex< double > *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_k_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_k_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_k_set" "', argument " "2"" of type '" "std::complex< double > [5]""'"); 
  } 
  arg2 = reinterpret_cast< std::complex< double > * >(argp2);
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)5; ++ii) *(std::complex< double > *)&arg1->k[ii] = *((std::complex< double > *)arg2 + ii);
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""k""' of type '""std::complex< double > [5]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_k_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::complex< double > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_k_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_k_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result = (std::complex< double > *)(std::complex< double > *) ((arg1)->k);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_eikna_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  std::complex< double > *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_eikna_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_eikna_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_eikna_set" "', argument " "2"" of type '" "std::complex< double > [5]""'"); 
  } 
  arg2 = reinterpret_cast< std::complex< double > * >(argp2);
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)5; ++ii) *(std::complex< double > *)&arg1->eikna[ii] = *((std::complex< double > *)arg2 + ii);
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""eikna""' of type '""std::complex< double > [5]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_eikna_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::complex< double > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_eikna_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_eikna_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result = (std::complex< double > *)(std::complex< double > *) ((arg1)->eikna);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_coskna_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_coskna_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_coskna_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_coskna_set" "', argument " "2"" of type '" "double [5]""'"); 
  } 
  arg2 = reinterpret_cast< double * >(argp2);
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)5; ++ii) *(double *)&arg1->coskna[ii] = *((double *)arg2 + ii);
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""coskna""' of type '""double [5]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_coskna_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_coskna_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_coskna_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result = (double *)(double *) ((arg1)->coskna);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_sinkna_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_sinkna_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_sinkna_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_sinkna_set" "', argument " "2"" of type '" "double [5]""'"); 
  } 
  arg2 = reinterpret_cast< double * >(argp2);
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)5; ++ii) *(double *)&arg1->sinkna[ii] = *((double *)arg2 + ii);
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""sinkna""' of type '""double [5]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_sinkna_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_sinkna_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_sinkna_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result = (double *)(double *) ((arg1)->sinkna);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_boundaries_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::boundary_condition (*arg2)[5] ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_boundaries_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_boundaries_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_a_5__meep__boundary_condition, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_boundaries_set" "', argument " "2"" of type '" "meep::boundary_condition [2][5]""'"); 
  } 
  arg2 = reinterpret_cast< meep::boundary_condition (*)[5] >(argp2);
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)2; ++ii) {
        if (arg2[ii]) {
          size_t jj = 0;
          for (; jj < (size_t)5; ++jj) arg1->boundaries[ii][jj] = arg2[ii][jj];
        } else {
          SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""boundaries""' of type '""meep::boundary_condition [2][5]""'");
        }
      }
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""boundaries""' of type '""meep::boundary_condition [2][5]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_boundaries_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::boundary_condition (*result)[5] = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_boundaries_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_boundaries_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result = (meep::boundary_condition (*)[5])(meep::boundary_condition (*)[5]) ((arg1)->boundaries);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_a_5__meep__boundary_condition, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_outdir_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_outdir_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_outdir_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_outdir_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (arg1->outdir) delete[] arg1->outdir;
  if (arg2) {
    size_t size = strlen(reinterpret_cast< const char * >(arg2)) + 1;
    arg1->outdir = (char *)reinterpret_cast< char* >(memcpy(new char[size], reinterpret_cast< const char * >(arg2), sizeof(char)*(size)));
  } else {
    arg1->outdir = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_outdir_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_outdir_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_outdir_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result = (char *) ((arg1)->outdir);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_components_allocated_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_components_allocated_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_components_allocated_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_bool(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_components_allocated_set" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  if (arg1) (arg1)->components_allocated = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_components_allocated_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "fields_components_allocated_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_components_allocated_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result = (bool) ((arg1)->components_allocated);
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_loop_tile_base_db_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_loop_tile_base_db_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_loop_tile_base_db_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_loop_tile_base_db_set" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  if (arg1) (arg1)->loop_tile_base_db = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_loop_tile_base_db_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  size_t result;
  
  if (!PyArg_UnpackTuple(args, "fields_loop_tile_base_db_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_loop_tile_base_db_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result =  ((arg1)->loop_tile_base_db);
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_loop_tile_base_eh_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_loop_tile_base_eh_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_loop_tile_base_eh_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_loop_tile_base_eh_set" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  if (arg1) (arg1)->loop_tile_base_eh = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_loop_tile_base_eh_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  size_t result;
  
  if (!PyArg_UnpackTuple(args, "fields_loop_tile_base_eh_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_loop_tile_base_eh_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result =  ((arg1)->loop_tile_base_eh);
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_fields__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  double arg2 ;
  double arg3 ;
  bool arg4 ;
  int arg5 ;
  int arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  meep::fields *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_fields", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_fields" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_fields" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_fields" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_fields" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_fields" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_fields" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  {
    try {
      result = (meep::fields *)new meep::fields(arg1,arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__fields, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_fields__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  double arg2 ;
  double arg3 ;
  bool arg4 ;
  int arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  meep::fields *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_fields", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_fields" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_fields" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_fields" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_fields" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_fields" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    try {
      result = (meep::fields *)new meep::fields(arg1,arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__fields, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_fields__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  double arg2 ;
  double arg3 ;
  bool arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::fields *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_fields", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_fields" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_fields" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_fields" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_fields" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  {
    try {
      result = (meep::fields *)new meep::fields(arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__fields, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_fields__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  double arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::fields *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_fields", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_fields" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_fields" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_fields" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      result = (meep::fields *)new meep::fields(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__fields, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_fields__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::fields *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_fields", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_fields" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_fields" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = (meep::fields *)new meep::fields(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__fields, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_fields__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::fields *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_fields", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_fields" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    try {
      result = (meep::fields *)new meep::fields(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__fields, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_fields__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::fields *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_fields", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__fields,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_fields" "', argument " "1"" of type '" "meep::fields const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_fields" "', argument " "1"" of type '" "meep::fields const &""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      result = (meep::fields *)new meep::fields((meep::fields const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__fields, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_fields(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[7] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_fields__SWIG_5(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_fields__SWIG_6(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_fields__SWIG_4(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new_fields__SWIG_3(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_new_fields__SWIG_2(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_new_fields__SWIG_1(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_new_fields__SWIG_0(self, args);
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_fields'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::fields(meep::structure *,double,double,bool,int,int)\n"
    "    meep::fields::fields(meep::structure *,double,double,bool,int)\n"
    "    meep::fields::fields(meep::structure *,double,double,bool)\n"
    "    meep::fields::fields(meep::structure *,double,double)\n"
    "    meep::fields::fields(meep::structure *,double)\n"
    "    meep::fields::fields(meep::structure *)\n"
    "    meep::fields::fields(meep::fields const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_fields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_fields", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_fields" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_equal_layout(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::fields *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "fields_equal_layout", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_equal_layout" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_equal_layout" "', argument " "2"" of type '" "meep::fields const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_equal_layout" "', argument " "2"" of type '" "meep::fields const &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  {
    try {
      result = (bool)((meep::fields const *)arg1)->equal_layout((meep::fields const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_use_real_fields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_use_real_fields", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_use_real_fields" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      (arg1)->use_real_fields();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_zero_fields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_zero_fields", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_zero_fields" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      (arg1)->zero_fields();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_remove_sources(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_remove_sources", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_remove_sources" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      (arg1)->remove_sources();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_remove_susceptibilities(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_remove_susceptibilities", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_remove_susceptibilities" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      (arg1)->remove_susceptibilities();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_remove_fluxes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_remove_fluxes", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_remove_fluxes" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      (arg1)->remove_fluxes();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_reset", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_reset" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      (arg1)->reset();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_log__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_log", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_log" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_log" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try {
      (arg1)->log((char const *)arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_log__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_log", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_log" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      (arg1)->log();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_log(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_fields_log__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_fields_log__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_log'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::log(char const *)\n"
    "    meep::fields::log()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_change_m(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_change_m", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_change_m" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_change_m" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      (arg1)->change_m(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_time_spent_on(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::time_sink arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< double,std::allocator< double > > result;
  
  if (!PyArg_UnpackTuple(args, "fields_time_spent_on", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_time_spent_on" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_time_spent_on" "', argument " "2"" of type '" "meep::time_sink""'");
  } 
  arg2 = static_cast< meep::time_sink >(val2);
  {
    try {
      result = (arg1)->time_spent_on(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    npy_intp vec_len = (npy_intp) (&result)->size();
    resultobj = PyArray_SimpleNew(1, &vec_len, NPY_DOUBLE);
    memcpy(PyArray_DATA((PyArrayObject*) resultobj), &result[0], vec_len * sizeof(double));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_mean_time_spent_on(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::time_sink arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_mean_time_spent_on", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_mean_time_spent_on" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_mean_time_spent_on" "', argument " "2"" of type '" "meep::time_sink""'");
  } 
  arg2 = static_cast< meep::time_sink >(val2);
  {
    try {
      result = (double)(arg1)->mean_time_spent_on(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_print_times(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_print_times", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_print_times" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      (arg1)->print_times();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_set_boundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::boundary_side arg2 ;
  meep::direction arg3 ;
  meep::boundary_condition arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_set_boundary", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_set_boundary" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_set_boundary" "', argument " "2"" of type '" "meep::boundary_side""'");
  } 
  arg2 = static_cast< meep::boundary_side >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_set_boundary" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_set_boundary" "', argument " "4"" of type '" "meep::boundary_condition""'");
  } 
  arg4 = static_cast< meep::boundary_condition >(val4);
  {
    try {
      (arg1)->set_boundary(arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_use_bloch__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_use_bloch", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_use_bloch" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_use_bloch" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_use_bloch" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      (arg1)->use_bloch(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_use_bloch__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  std::complex< double > arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  std::complex< double > val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_use_bloch", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_use_bloch" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_use_bloch" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  ecode3 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_use_bloch" "', argument " "3"" of type '" "std::complex< double >""'");
  } 
  arg3 = static_cast< std::complex< double > >(val3);
  {
    try {
      (arg1)->use_bloch(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_use_bloch__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_use_bloch", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_use_bloch" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_use_bloch" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_use_bloch" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      (arg1)->use_bloch((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_use_bloch(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_fields_use_bloch__SWIG_2(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_fields_use_bloch__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_fields_use_bloch__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_use_bloch'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::use_bloch(meep::direction,double)\n"
    "    meep::fields::use_bloch(meep::direction,std::complex< double >)\n"
    "    meep::fields::use_bloch(meep::vec const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_lattice_vector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "fields_lattice_vector", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_lattice_vector" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_lattice_vector" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  {
    try {
      result = ((meep::fields const *)arg1)->lattice_vector(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_update_eh__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::field_type arg2 ;
  bool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_update_eh", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_update_eh" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_update_eh" "', argument " "2"" of type '" "meep::field_type""'");
  } 
  arg2 = static_cast< meep::field_type >(val2);
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_update_eh" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      (arg1)->update_eh(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_update_eh__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::field_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_update_eh", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_update_eh" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_update_eh" "', argument " "2"" of type '" "meep::field_type""'");
  } 
  arg2 = static_cast< meep::field_type >(val2);
  {
    try {
      (arg1)->update_eh(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_update_eh(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_fields_update_eh__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_bool(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_fields_update_eh__SWIG_0(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_update_eh'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::update_eh(meep::field_type,bool)\n"
    "    meep::fields::update_eh(meep::field_type)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_total_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  SwigValueWrapper< meep::volume > result;
  
  if (!PyArg_UnpackTuple(args, "fields_total_volume", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_total_volume" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      result = ((meep::fields const *)arg1)->total_volume();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::volume(static_cast< const meep::volume& >(result))), SWIGTYPE_p_meep__volume, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_dump__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  bool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_dump", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_dump" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_dump" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_dump" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      (arg1)->dump((char const *)arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_dump__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_dump", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_dump" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_dump" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try {
      (arg1)->dump((char const *)arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_dump(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_fields_dump__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_bool(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_fields_dump__SWIG_0(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_dump'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::dump(char const *,bool)\n"
    "    meep::fields::dump(char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_load__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  bool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_load", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_load" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_load" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_load" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      (arg1)->load((char const *)arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_load__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_load", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_load" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_load" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try {
      (arg1)->load((char const *)arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_load(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_fields_load__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_bool(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_fields_load__SWIG_0(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_load'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::load(char const *,bool)\n"
    "    meep::fields::load(char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::h5file *arg2 = (meep::h5file *) 0 ;
  char *arg3 = (char *) 0 ;
  int arg4 ;
  meep::component *arg5 = (meep::component *) 0 ;
  meep::field_function arg6 = (meep::field_function) 0 ;
  void *arg7 = (void *) 0 ;
  int arg8 ;
  meep::volume *arg9 = 0 ;
  bool arg10 ;
  bool arg11 ;
  double arg12 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  py_field_func_data tmp_data4 ;
  int val8 ;
  int ecode8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  bool val10 ;
  int ecode10 = 0 ;
  bool val11 ;
  int ecode11 = 0 ;
  double val12 ;
  int ecode12 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 9, 9, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_output_hdf5" "', argument " "2"" of type '" "meep::h5file *""'"); 
  }
  arg2 = reinterpret_cast< meep::h5file * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    if (!PySequence_Check(obj3)) {
      meep::abort("Expected a sequence");
    }
    
    PyObject *cs = PyList_GetItem(obj3, 0);
    
    if (!PySequence_Check(cs)) {
      meep::abort("Expected first item in list to be a list");
    }
    
    PyObject *func = PyList_GetItem(obj3, 1);
    
    if (!PyCallable_Check(func)) {
      meep::abort("Expected a function");
    }
    
    arg4 = PyList_Size(cs);
    arg5 = new meep::component[arg4];
    
    for (Py_ssize_t i = 0; i < arg4; i++) {
      arg5[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(cs, i));
    }
    
    arg6 = py_field_func_wrap;
    
    tmp_data4.num_components = arg4;
    tmp_data4.func = func;
    Py_INCREF(tmp_data4.func);
    arg7 = &tmp_data4;
  }
  ecode8 = SWIG_AsVal_int(obj4, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_output_hdf5" "', argument " "8"" of type '" "int""'");
  } 
  arg8 = static_cast< int >(val8);
  res9 = SWIG_ConvertPtr(obj5, &argp9, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_output_hdf5" "', argument " "9"" of type '" "meep::volume const &""'"); 
  }
  if (!argp9) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "9"" of type '" "meep::volume const &""'"); 
  }
  arg9 = reinterpret_cast< meep::volume * >(argp9);
  ecode10 = SWIG_AsVal_bool(obj6, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_output_hdf5" "', argument " "10"" of type '" "bool""'");
  } 
  arg10 = static_cast< bool >(val10);
  ecode11 = SWIG_AsVal_bool(obj7, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fields_output_hdf5" "', argument " "11"" of type '" "bool""'");
  } 
  arg11 = static_cast< bool >(val11);
  ecode12 = SWIG_AsVal_double(obj8, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "fields_output_hdf5" "', argument " "12"" of type '" "double""'");
  } 
  arg12 = static_cast< double >(val12);
  {
    try {
      (arg1)->output_hdf5(arg2,(char const *)arg3,arg4,(meep::component const *)arg5,arg6,arg7,arg8,(meep::volume const &)*arg9,arg10,arg11,arg12);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  {
    delete[] arg5;
    Py_XDECREF(tmp_data4.func);
  }
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  {
    delete[] arg5;
    Py_XDECREF(tmp_data4.func);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::h5file *arg2 = (meep::h5file *) 0 ;
  char *arg3 = (char *) 0 ;
  int arg4 ;
  meep::component *arg5 = (meep::component *) 0 ;
  meep::field_function arg6 = (meep::field_function) 0 ;
  void *arg7 = (void *) 0 ;
  int arg8 ;
  meep::volume *arg9 = 0 ;
  bool arg10 ;
  bool arg11 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  py_field_func_data tmp_data4 ;
  int val8 ;
  int ecode8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  bool val10 ;
  int ecode10 = 0 ;
  bool val11 ;
  int ecode11 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_output_hdf5" "', argument " "2"" of type '" "meep::h5file *""'"); 
  }
  arg2 = reinterpret_cast< meep::h5file * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    if (!PySequence_Check(obj3)) {
      meep::abort("Expected a sequence");
    }
    
    PyObject *cs = PyList_GetItem(obj3, 0);
    
    if (!PySequence_Check(cs)) {
      meep::abort("Expected first item in list to be a list");
    }
    
    PyObject *func = PyList_GetItem(obj3, 1);
    
    if (!PyCallable_Check(func)) {
      meep::abort("Expected a function");
    }
    
    arg4 = PyList_Size(cs);
    arg5 = new meep::component[arg4];
    
    for (Py_ssize_t i = 0; i < arg4; i++) {
      arg5[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(cs, i));
    }
    
    arg6 = py_field_func_wrap;
    
    tmp_data4.num_components = arg4;
    tmp_data4.func = func;
    Py_INCREF(tmp_data4.func);
    arg7 = &tmp_data4;
  }
  ecode8 = SWIG_AsVal_int(obj4, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_output_hdf5" "', argument " "8"" of type '" "int""'");
  } 
  arg8 = static_cast< int >(val8);
  res9 = SWIG_ConvertPtr(obj5, &argp9, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_output_hdf5" "', argument " "9"" of type '" "meep::volume const &""'"); 
  }
  if (!argp9) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "9"" of type '" "meep::volume const &""'"); 
  }
  arg9 = reinterpret_cast< meep::volume * >(argp9);
  ecode10 = SWIG_AsVal_bool(obj6, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_output_hdf5" "', argument " "10"" of type '" "bool""'");
  } 
  arg10 = static_cast< bool >(val10);
  ecode11 = SWIG_AsVal_bool(obj7, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fields_output_hdf5" "', argument " "11"" of type '" "bool""'");
  } 
  arg11 = static_cast< bool >(val11);
  {
    try {
      (arg1)->output_hdf5(arg2,(char const *)arg3,arg4,(meep::component const *)arg5,arg6,arg7,arg8,(meep::volume const &)*arg9,arg10,arg11);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  {
    delete[] arg5;
    Py_XDECREF(tmp_data4.func);
  }
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  {
    delete[] arg5;
    Py_XDECREF(tmp_data4.func);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::h5file *arg2 = (meep::h5file *) 0 ;
  char *arg3 = (char *) 0 ;
  int arg4 ;
  meep::component *arg5 = (meep::component *) 0 ;
  meep::field_function arg6 = (meep::field_function) 0 ;
  void *arg7 = (void *) 0 ;
  int arg8 ;
  meep::volume *arg9 = 0 ;
  bool arg10 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  py_field_func_data tmp_data4 ;
  int val8 ;
  int ecode8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  bool val10 ;
  int ecode10 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_output_hdf5" "', argument " "2"" of type '" "meep::h5file *""'"); 
  }
  arg2 = reinterpret_cast< meep::h5file * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    if (!PySequence_Check(obj3)) {
      meep::abort("Expected a sequence");
    }
    
    PyObject *cs = PyList_GetItem(obj3, 0);
    
    if (!PySequence_Check(cs)) {
      meep::abort("Expected first item in list to be a list");
    }
    
    PyObject *func = PyList_GetItem(obj3, 1);
    
    if (!PyCallable_Check(func)) {
      meep::abort("Expected a function");
    }
    
    arg4 = PyList_Size(cs);
    arg5 = new meep::component[arg4];
    
    for (Py_ssize_t i = 0; i < arg4; i++) {
      arg5[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(cs, i));
    }
    
    arg6 = py_field_func_wrap;
    
    tmp_data4.num_components = arg4;
    tmp_data4.func = func;
    Py_INCREF(tmp_data4.func);
    arg7 = &tmp_data4;
  }
  ecode8 = SWIG_AsVal_int(obj4, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_output_hdf5" "', argument " "8"" of type '" "int""'");
  } 
  arg8 = static_cast< int >(val8);
  res9 = SWIG_ConvertPtr(obj5, &argp9, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_output_hdf5" "', argument " "9"" of type '" "meep::volume const &""'"); 
  }
  if (!argp9) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "9"" of type '" "meep::volume const &""'"); 
  }
  arg9 = reinterpret_cast< meep::volume * >(argp9);
  ecode10 = SWIG_AsVal_bool(obj6, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_output_hdf5" "', argument " "10"" of type '" "bool""'");
  } 
  arg10 = static_cast< bool >(val10);
  {
    try {
      (arg1)->output_hdf5(arg2,(char const *)arg3,arg4,(meep::component const *)arg5,arg6,arg7,arg8,(meep::volume const &)*arg9,arg10);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  {
    delete[] arg5;
    Py_XDECREF(tmp_data4.func);
  }
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  {
    delete[] arg5;
    Py_XDECREF(tmp_data4.func);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::h5file *arg2 = (meep::h5file *) 0 ;
  char *arg3 = (char *) 0 ;
  int arg4 ;
  meep::component *arg5 = (meep::component *) 0 ;
  meep::field_function arg6 = (meep::field_function) 0 ;
  void *arg7 = (void *) 0 ;
  int arg8 ;
  meep::volume *arg9 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  py_field_func_data tmp_data4 ;
  int val8 ;
  int ecode8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_output_hdf5" "', argument " "2"" of type '" "meep::h5file *""'"); 
  }
  arg2 = reinterpret_cast< meep::h5file * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    if (!PySequence_Check(obj3)) {
      meep::abort("Expected a sequence");
    }
    
    PyObject *cs = PyList_GetItem(obj3, 0);
    
    if (!PySequence_Check(cs)) {
      meep::abort("Expected first item in list to be a list");
    }
    
    PyObject *func = PyList_GetItem(obj3, 1);
    
    if (!PyCallable_Check(func)) {
      meep::abort("Expected a function");
    }
    
    arg4 = PyList_Size(cs);
    arg5 = new meep::component[arg4];
    
    for (Py_ssize_t i = 0; i < arg4; i++) {
      arg5[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(cs, i));
    }
    
    arg6 = py_field_func_wrap;
    
    tmp_data4.num_components = arg4;
    tmp_data4.func = func;
    Py_INCREF(tmp_data4.func);
    arg7 = &tmp_data4;
  }
  ecode8 = SWIG_AsVal_int(obj4, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_output_hdf5" "', argument " "8"" of type '" "int""'");
  } 
  arg8 = static_cast< int >(val8);
  res9 = SWIG_ConvertPtr(obj5, &argp9, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_output_hdf5" "', argument " "9"" of type '" "meep::volume const &""'"); 
  }
  if (!argp9) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "9"" of type '" "meep::volume const &""'"); 
  }
  arg9 = reinterpret_cast< meep::volume * >(argp9);
  {
    try {
      (arg1)->output_hdf5(arg2,(char const *)arg3,arg4,(meep::component const *)arg5,arg6,arg7,arg8,(meep::volume const &)*arg9);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  {
    delete[] arg5;
    Py_XDECREF(tmp_data4.func);
  }
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  {
    delete[] arg5;
    Py_XDECREF(tmp_data4.func);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  meep::component *arg4 = (meep::component *) 0 ;
  meep::field_function arg5 = (meep::field_function) 0 ;
  void *arg6 = (void *) 0 ;
  meep::volume *arg7 = 0 ;
  meep::h5file *arg8 = (meep::h5file *) 0 ;
  bool arg9 ;
  bool arg10 ;
  char *arg11 = (char *) 0 ;
  bool arg12 ;
  double arg13 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  py_field_func_data tmp_data3 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  bool val9 ;
  int ecode9 = 0 ;
  bool val10 ;
  int ecode10 = 0 ;
  int res11 ;
  char *buf11 = 0 ;
  int alloc11 = 0 ;
  bool val12 ;
  int ecode12 = 0 ;
  double val13 ;
  int ecode13 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 10, 10, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_output_hdf5" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!PySequence_Check(obj2)) {
      meep::abort("Expected a sequence");
    }
    
    PyObject *cs = PyList_GetItem(obj2, 0);
    
    if (!PySequence_Check(cs)) {
      meep::abort("Expected first item in list to be a list");
    }
    
    PyObject *func = PyList_GetItem(obj2, 1);
    
    if (!PyCallable_Check(func)) {
      meep::abort("Expected a function");
    }
    
    arg3 = PyList_Size(cs);
    arg4 = new meep::component[arg3];
    
    for (Py_ssize_t i = 0; i < arg3; i++) {
      arg4[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(cs, i));
    }
    
    arg5 = py_field_func_wrap;
    
    tmp_data3.num_components = arg3;
    tmp_data3.func = func;
    Py_INCREF(tmp_data3.func);
    arg6 = &tmp_data3;
  }
  res7 = SWIG_ConvertPtr(obj3, &argp7, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  arg7 = reinterpret_cast< meep::volume * >(argp7);
  res8 = SWIG_ConvertPtr(obj4, &argp8,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_output_hdf5" "', argument " "8"" of type '" "meep::h5file *""'"); 
  }
  arg8 = reinterpret_cast< meep::h5file * >(argp8);
  ecode9 = SWIG_AsVal_bool(obj5, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_output_hdf5" "', argument " "9"" of type '" "bool""'");
  } 
  arg9 = static_cast< bool >(val9);
  ecode10 = SWIG_AsVal_bool(obj6, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_output_hdf5" "', argument " "10"" of type '" "bool""'");
  } 
  arg10 = static_cast< bool >(val10);
  res11 = SWIG_AsCharPtrAndSize(obj7, &buf11, NULL, &alloc11);
  if (!SWIG_IsOK(res11)) {
    SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "fields_output_hdf5" "', argument " "11"" of type '" "char const *""'");
  }
  arg11 = reinterpret_cast< char * >(buf11);
  ecode12 = SWIG_AsVal_bool(obj8, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "fields_output_hdf5" "', argument " "12"" of type '" "bool""'");
  } 
  arg12 = static_cast< bool >(val12);
  ecode13 = SWIG_AsVal_double(obj9, &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "fields_output_hdf5" "', argument " "13"" of type '" "double""'");
  } 
  arg13 = static_cast< double >(val13);
  {
    try {
      (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8,arg9,arg10,(char const *)arg11,arg12,arg13);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    delete[] arg4;
    Py_XDECREF(tmp_data3.func);
  }
  if (alloc11 == SWIG_NEWOBJ) delete[] buf11;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    delete[] arg4;
    Py_XDECREF(tmp_data3.func);
  }
  if (alloc11 == SWIG_NEWOBJ) delete[] buf11;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  meep::component *arg4 = (meep::component *) 0 ;
  meep::field_function arg5 = (meep::field_function) 0 ;
  void *arg6 = (void *) 0 ;
  meep::volume *arg7 = 0 ;
  meep::h5file *arg8 = (meep::h5file *) 0 ;
  bool arg9 ;
  bool arg10 ;
  char *arg11 = (char *) 0 ;
  bool arg12 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  py_field_func_data tmp_data3 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  bool val9 ;
  int ecode9 = 0 ;
  bool val10 ;
  int ecode10 = 0 ;
  int res11 ;
  char *buf11 = 0 ;
  int alloc11 = 0 ;
  bool val12 ;
  int ecode12 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 9, 9, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_output_hdf5" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!PySequence_Check(obj2)) {
      meep::abort("Expected a sequence");
    }
    
    PyObject *cs = PyList_GetItem(obj2, 0);
    
    if (!PySequence_Check(cs)) {
      meep::abort("Expected first item in list to be a list");
    }
    
    PyObject *func = PyList_GetItem(obj2, 1);
    
    if (!PyCallable_Check(func)) {
      meep::abort("Expected a function");
    }
    
    arg3 = PyList_Size(cs);
    arg4 = new meep::component[arg3];
    
    for (Py_ssize_t i = 0; i < arg3; i++) {
      arg4[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(cs, i));
    }
    
    arg5 = py_field_func_wrap;
    
    tmp_data3.num_components = arg3;
    tmp_data3.func = func;
    Py_INCREF(tmp_data3.func);
    arg6 = &tmp_data3;
  }
  res7 = SWIG_ConvertPtr(obj3, &argp7, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  arg7 = reinterpret_cast< meep::volume * >(argp7);
  res8 = SWIG_ConvertPtr(obj4, &argp8,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_output_hdf5" "', argument " "8"" of type '" "meep::h5file *""'"); 
  }
  arg8 = reinterpret_cast< meep::h5file * >(argp8);
  ecode9 = SWIG_AsVal_bool(obj5, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_output_hdf5" "', argument " "9"" of type '" "bool""'");
  } 
  arg9 = static_cast< bool >(val9);
  ecode10 = SWIG_AsVal_bool(obj6, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_output_hdf5" "', argument " "10"" of type '" "bool""'");
  } 
  arg10 = static_cast< bool >(val10);
  res11 = SWIG_AsCharPtrAndSize(obj7, &buf11, NULL, &alloc11);
  if (!SWIG_IsOK(res11)) {
    SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "fields_output_hdf5" "', argument " "11"" of type '" "char const *""'");
  }
  arg11 = reinterpret_cast< char * >(buf11);
  ecode12 = SWIG_AsVal_bool(obj8, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "fields_output_hdf5" "', argument " "12"" of type '" "bool""'");
  } 
  arg12 = static_cast< bool >(val12);
  {
    try {
      (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8,arg9,arg10,(char const *)arg11,arg12);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    delete[] arg4;
    Py_XDECREF(tmp_data3.func);
  }
  if (alloc11 == SWIG_NEWOBJ) delete[] buf11;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    delete[] arg4;
    Py_XDECREF(tmp_data3.func);
  }
  if (alloc11 == SWIG_NEWOBJ) delete[] buf11;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  meep::component *arg4 = (meep::component *) 0 ;
  meep::field_function arg5 = (meep::field_function) 0 ;
  void *arg6 = (void *) 0 ;
  meep::volume *arg7 = 0 ;
  meep::h5file *arg8 = (meep::h5file *) 0 ;
  bool arg9 ;
  bool arg10 ;
  char *arg11 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  py_field_func_data tmp_data3 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  bool val9 ;
  int ecode9 = 0 ;
  bool val10 ;
  int ecode10 = 0 ;
  int res11 ;
  char *buf11 = 0 ;
  int alloc11 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_output_hdf5" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!PySequence_Check(obj2)) {
      meep::abort("Expected a sequence");
    }
    
    PyObject *cs = PyList_GetItem(obj2, 0);
    
    if (!PySequence_Check(cs)) {
      meep::abort("Expected first item in list to be a list");
    }
    
    PyObject *func = PyList_GetItem(obj2, 1);
    
    if (!PyCallable_Check(func)) {
      meep::abort("Expected a function");
    }
    
    arg3 = PyList_Size(cs);
    arg4 = new meep::component[arg3];
    
    for (Py_ssize_t i = 0; i < arg3; i++) {
      arg4[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(cs, i));
    }
    
    arg5 = py_field_func_wrap;
    
    tmp_data3.num_components = arg3;
    tmp_data3.func = func;
    Py_INCREF(tmp_data3.func);
    arg6 = &tmp_data3;
  }
  res7 = SWIG_ConvertPtr(obj3, &argp7, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  arg7 = reinterpret_cast< meep::volume * >(argp7);
  res8 = SWIG_ConvertPtr(obj4, &argp8,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_output_hdf5" "', argument " "8"" of type '" "meep::h5file *""'"); 
  }
  arg8 = reinterpret_cast< meep::h5file * >(argp8);
  ecode9 = SWIG_AsVal_bool(obj5, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_output_hdf5" "', argument " "9"" of type '" "bool""'");
  } 
  arg9 = static_cast< bool >(val9);
  ecode10 = SWIG_AsVal_bool(obj6, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_output_hdf5" "', argument " "10"" of type '" "bool""'");
  } 
  arg10 = static_cast< bool >(val10);
  res11 = SWIG_AsCharPtrAndSize(obj7, &buf11, NULL, &alloc11);
  if (!SWIG_IsOK(res11)) {
    SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "fields_output_hdf5" "', argument " "11"" of type '" "char const *""'");
  }
  arg11 = reinterpret_cast< char * >(buf11);
  {
    try {
      (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8,arg9,arg10,(char const *)arg11);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    delete[] arg4;
    Py_XDECREF(tmp_data3.func);
  }
  if (alloc11 == SWIG_NEWOBJ) delete[] buf11;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    delete[] arg4;
    Py_XDECREF(tmp_data3.func);
  }
  if (alloc11 == SWIG_NEWOBJ) delete[] buf11;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  meep::component *arg4 = (meep::component *) 0 ;
  meep::field_function arg5 = (meep::field_function) 0 ;
  void *arg6 = (void *) 0 ;
  meep::volume *arg7 = 0 ;
  meep::h5file *arg8 = (meep::h5file *) 0 ;
  bool arg9 ;
  bool arg10 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  py_field_func_data tmp_data3 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  bool val9 ;
  int ecode9 = 0 ;
  bool val10 ;
  int ecode10 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_output_hdf5" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!PySequence_Check(obj2)) {
      meep::abort("Expected a sequence");
    }
    
    PyObject *cs = PyList_GetItem(obj2, 0);
    
    if (!PySequence_Check(cs)) {
      meep::abort("Expected first item in list to be a list");
    }
    
    PyObject *func = PyList_GetItem(obj2, 1);
    
    if (!PyCallable_Check(func)) {
      meep::abort("Expected a function");
    }
    
    arg3 = PyList_Size(cs);
    arg4 = new meep::component[arg3];
    
    for (Py_ssize_t i = 0; i < arg3; i++) {
      arg4[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(cs, i));
    }
    
    arg5 = py_field_func_wrap;
    
    tmp_data3.num_components = arg3;
    tmp_data3.func = func;
    Py_INCREF(tmp_data3.func);
    arg6 = &tmp_data3;
  }
  res7 = SWIG_ConvertPtr(obj3, &argp7, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  arg7 = reinterpret_cast< meep::volume * >(argp7);
  res8 = SWIG_ConvertPtr(obj4, &argp8,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_output_hdf5" "', argument " "8"" of type '" "meep::h5file *""'"); 
  }
  arg8 = reinterpret_cast< meep::h5file * >(argp8);
  ecode9 = SWIG_AsVal_bool(obj5, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_output_hdf5" "', argument " "9"" of type '" "bool""'");
  } 
  arg9 = static_cast< bool >(val9);
  ecode10 = SWIG_AsVal_bool(obj6, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_output_hdf5" "', argument " "10"" of type '" "bool""'");
  } 
  arg10 = static_cast< bool >(val10);
  {
    try {
      (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8,arg9,arg10);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    delete[] arg4;
    Py_XDECREF(tmp_data3.func);
  }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    delete[] arg4;
    Py_XDECREF(tmp_data3.func);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  meep::component *arg4 = (meep::component *) 0 ;
  meep::field_function arg5 = (meep::field_function) 0 ;
  void *arg6 = (void *) 0 ;
  meep::volume *arg7 = 0 ;
  meep::h5file *arg8 = (meep::h5file *) 0 ;
  bool arg9 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  py_field_func_data tmp_data3 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  bool val9 ;
  int ecode9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_output_hdf5" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!PySequence_Check(obj2)) {
      meep::abort("Expected a sequence");
    }
    
    PyObject *cs = PyList_GetItem(obj2, 0);
    
    if (!PySequence_Check(cs)) {
      meep::abort("Expected first item in list to be a list");
    }
    
    PyObject *func = PyList_GetItem(obj2, 1);
    
    if (!PyCallable_Check(func)) {
      meep::abort("Expected a function");
    }
    
    arg3 = PyList_Size(cs);
    arg4 = new meep::component[arg3];
    
    for (Py_ssize_t i = 0; i < arg3; i++) {
      arg4[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(cs, i));
    }
    
    arg5 = py_field_func_wrap;
    
    tmp_data3.num_components = arg3;
    tmp_data3.func = func;
    Py_INCREF(tmp_data3.func);
    arg6 = &tmp_data3;
  }
  res7 = SWIG_ConvertPtr(obj3, &argp7, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  arg7 = reinterpret_cast< meep::volume * >(argp7);
  res8 = SWIG_ConvertPtr(obj4, &argp8,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_output_hdf5" "', argument " "8"" of type '" "meep::h5file *""'"); 
  }
  arg8 = reinterpret_cast< meep::h5file * >(argp8);
  ecode9 = SWIG_AsVal_bool(obj5, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_output_hdf5" "', argument " "9"" of type '" "bool""'");
  } 
  arg9 = static_cast< bool >(val9);
  {
    try {
      (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8,arg9);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    delete[] arg4;
    Py_XDECREF(tmp_data3.func);
  }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    delete[] arg4;
    Py_XDECREF(tmp_data3.func);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_9(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  meep::component *arg4 = (meep::component *) 0 ;
  meep::field_function arg5 = (meep::field_function) 0 ;
  void *arg6 = (void *) 0 ;
  meep::volume *arg7 = 0 ;
  meep::h5file *arg8 = (meep::h5file *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  py_field_func_data tmp_data3 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_output_hdf5" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!PySequence_Check(obj2)) {
      meep::abort("Expected a sequence");
    }
    
    PyObject *cs = PyList_GetItem(obj2, 0);
    
    if (!PySequence_Check(cs)) {
      meep::abort("Expected first item in list to be a list");
    }
    
    PyObject *func = PyList_GetItem(obj2, 1);
    
    if (!PyCallable_Check(func)) {
      meep::abort("Expected a function");
    }
    
    arg3 = PyList_Size(cs);
    arg4 = new meep::component[arg3];
    
    for (Py_ssize_t i = 0; i < arg3; i++) {
      arg4[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(cs, i));
    }
    
    arg5 = py_field_func_wrap;
    
    tmp_data3.num_components = arg3;
    tmp_data3.func = func;
    Py_INCREF(tmp_data3.func);
    arg6 = &tmp_data3;
  }
  res7 = SWIG_ConvertPtr(obj3, &argp7, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  arg7 = reinterpret_cast< meep::volume * >(argp7);
  res8 = SWIG_ConvertPtr(obj4, &argp8,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_output_hdf5" "', argument " "8"" of type '" "meep::h5file *""'"); 
  }
  arg8 = reinterpret_cast< meep::h5file * >(argp8);
  {
    try {
      (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    delete[] arg4;
    Py_XDECREF(tmp_data3.func);
  }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    delete[] arg4;
    Py_XDECREF(tmp_data3.func);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_10(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  meep::component *arg4 = (meep::component *) 0 ;
  meep::field_function arg5 = (meep::field_function) 0 ;
  void *arg6 = (void *) 0 ;
  meep::volume *arg7 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  py_field_func_data tmp_data3 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_output_hdf5" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!PySequence_Check(obj2)) {
      meep::abort("Expected a sequence");
    }
    
    PyObject *cs = PyList_GetItem(obj2, 0);
    
    if (!PySequence_Check(cs)) {
      meep::abort("Expected first item in list to be a list");
    }
    
    PyObject *func = PyList_GetItem(obj2, 1);
    
    if (!PyCallable_Check(func)) {
      meep::abort("Expected a function");
    }
    
    arg3 = PyList_Size(cs);
    arg4 = new meep::component[arg3];
    
    for (Py_ssize_t i = 0; i < arg3; i++) {
      arg4[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(cs, i));
    }
    
    arg5 = py_field_func_wrap;
    
    tmp_data3.num_components = arg3;
    tmp_data3.func = func;
    Py_INCREF(tmp_data3.func);
    arg6 = &tmp_data3;
  }
  res7 = SWIG_ConvertPtr(obj3, &argp7, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  arg7 = reinterpret_cast< meep::volume * >(argp7);
  {
    try {
      (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    delete[] arg4;
    Py_XDECREF(tmp_data3.func);
  }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    delete[] arg4;
    Py_XDECREF(tmp_data3.func);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_11(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  meep::component *arg4 = (meep::component *) 0 ;
  meep::field_rfunction arg5 = (meep::field_rfunction) 0 ;
  void *arg6 = (void *) 0 ;
  meep::volume *arg7 = 0 ;
  meep::h5file *arg8 = (meep::h5file *) 0 ;
  bool arg9 ;
  bool arg10 ;
  char *arg11 = (char *) 0 ;
  double arg12 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int res6 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  bool val9 ;
  int ecode9 = 0 ;
  bool val10 ;
  int ecode10 = 0 ;
  int res11 ;
  char *buf11 = 0 ;
  int alloc11 = 0 ;
  double val12 ;
  int ecode12 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 12, 12, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_output_hdf5" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__component, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_output_hdf5" "', argument " "4"" of type '" "meep::component const *""'"); 
  }
  arg4 = reinterpret_cast< meep::component * >(argp4);
  {
    int res = SWIG_ConvertFunctionPtr(obj4, (void**)(&arg5), SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_output_hdf5" "', argument " "5"" of type '" "meep::field_rfunction""'"); 
    }
  }
  res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_output_hdf5" "', argument " "6"" of type '" "void *""'"); 
  }
  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  arg7 = reinterpret_cast< meep::volume * >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_output_hdf5" "', argument " "8"" of type '" "meep::h5file *""'"); 
  }
  arg8 = reinterpret_cast< meep::h5file * >(argp8);
  ecode9 = SWIG_AsVal_bool(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_output_hdf5" "', argument " "9"" of type '" "bool""'");
  } 
  arg9 = static_cast< bool >(val9);
  ecode10 = SWIG_AsVal_bool(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_output_hdf5" "', argument " "10"" of type '" "bool""'");
  } 
  arg10 = static_cast< bool >(val10);
  res11 = SWIG_AsCharPtrAndSize(obj10, &buf11, NULL, &alloc11);
  if (!SWIG_IsOK(res11)) {
    SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "fields_output_hdf5" "', argument " "11"" of type '" "char const *""'");
  }
  arg11 = reinterpret_cast< char * >(buf11);
  ecode12 = SWIG_AsVal_double(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "fields_output_hdf5" "', argument " "12"" of type '" "double""'");
  } 
  arg12 = static_cast< double >(val12);
  {
    try {
      (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8,arg9,arg10,(char const *)arg11,arg12);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc11 == SWIG_NEWOBJ) delete[] buf11;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc11 == SWIG_NEWOBJ) delete[] buf11;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_12(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  meep::component *arg4 = (meep::component *) 0 ;
  meep::field_rfunction arg5 = (meep::field_rfunction) 0 ;
  void *arg6 = (void *) 0 ;
  meep::volume *arg7 = 0 ;
  meep::h5file *arg8 = (meep::h5file *) 0 ;
  bool arg9 ;
  bool arg10 ;
  char *arg11 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int res6 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  bool val9 ;
  int ecode9 = 0 ;
  bool val10 ;
  int ecode10 = 0 ;
  int res11 ;
  char *buf11 = 0 ;
  int alloc11 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 11, 11, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_output_hdf5" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__component, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_output_hdf5" "', argument " "4"" of type '" "meep::component const *""'"); 
  }
  arg4 = reinterpret_cast< meep::component * >(argp4);
  {
    int res = SWIG_ConvertFunctionPtr(obj4, (void**)(&arg5), SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_output_hdf5" "', argument " "5"" of type '" "meep::field_rfunction""'"); 
    }
  }
  res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_output_hdf5" "', argument " "6"" of type '" "void *""'"); 
  }
  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  arg7 = reinterpret_cast< meep::volume * >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_output_hdf5" "', argument " "8"" of type '" "meep::h5file *""'"); 
  }
  arg8 = reinterpret_cast< meep::h5file * >(argp8);
  ecode9 = SWIG_AsVal_bool(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_output_hdf5" "', argument " "9"" of type '" "bool""'");
  } 
  arg9 = static_cast< bool >(val9);
  ecode10 = SWIG_AsVal_bool(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_output_hdf5" "', argument " "10"" of type '" "bool""'");
  } 
  arg10 = static_cast< bool >(val10);
  res11 = SWIG_AsCharPtrAndSize(obj10, &buf11, NULL, &alloc11);
  if (!SWIG_IsOK(res11)) {
    SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "fields_output_hdf5" "', argument " "11"" of type '" "char const *""'");
  }
  arg11 = reinterpret_cast< char * >(buf11);
  {
    try {
      (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8,arg9,arg10,(char const *)arg11);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc11 == SWIG_NEWOBJ) delete[] buf11;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc11 == SWIG_NEWOBJ) delete[] buf11;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_13(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  meep::component *arg4 = (meep::component *) 0 ;
  meep::field_rfunction arg5 = (meep::field_rfunction) 0 ;
  void *arg6 = (void *) 0 ;
  meep::volume *arg7 = 0 ;
  meep::h5file *arg8 = (meep::h5file *) 0 ;
  bool arg9 ;
  bool arg10 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int res6 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  bool val9 ;
  int ecode9 = 0 ;
  bool val10 ;
  int ecode10 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 10, 10, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_output_hdf5" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__component, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_output_hdf5" "', argument " "4"" of type '" "meep::component const *""'"); 
  }
  arg4 = reinterpret_cast< meep::component * >(argp4);
  {
    int res = SWIG_ConvertFunctionPtr(obj4, (void**)(&arg5), SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_output_hdf5" "', argument " "5"" of type '" "meep::field_rfunction""'"); 
    }
  }
  res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_output_hdf5" "', argument " "6"" of type '" "void *""'"); 
  }
  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  arg7 = reinterpret_cast< meep::volume * >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_output_hdf5" "', argument " "8"" of type '" "meep::h5file *""'"); 
  }
  arg8 = reinterpret_cast< meep::h5file * >(argp8);
  ecode9 = SWIG_AsVal_bool(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_output_hdf5" "', argument " "9"" of type '" "bool""'");
  } 
  arg9 = static_cast< bool >(val9);
  ecode10 = SWIG_AsVal_bool(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_output_hdf5" "', argument " "10"" of type '" "bool""'");
  } 
  arg10 = static_cast< bool >(val10);
  {
    try {
      (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8,arg9,arg10);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_14(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  meep::component *arg4 = (meep::component *) 0 ;
  meep::field_rfunction arg5 = (meep::field_rfunction) 0 ;
  void *arg6 = (void *) 0 ;
  meep::volume *arg7 = 0 ;
  meep::h5file *arg8 = (meep::h5file *) 0 ;
  bool arg9 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int res6 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  bool val9 ;
  int ecode9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 9, 9, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_output_hdf5" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__component, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_output_hdf5" "', argument " "4"" of type '" "meep::component const *""'"); 
  }
  arg4 = reinterpret_cast< meep::component * >(argp4);
  {
    int res = SWIG_ConvertFunctionPtr(obj4, (void**)(&arg5), SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_output_hdf5" "', argument " "5"" of type '" "meep::field_rfunction""'"); 
    }
  }
  res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_output_hdf5" "', argument " "6"" of type '" "void *""'"); 
  }
  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  arg7 = reinterpret_cast< meep::volume * >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_output_hdf5" "', argument " "8"" of type '" "meep::h5file *""'"); 
  }
  arg8 = reinterpret_cast< meep::h5file * >(argp8);
  ecode9 = SWIG_AsVal_bool(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_output_hdf5" "', argument " "9"" of type '" "bool""'");
  } 
  arg9 = static_cast< bool >(val9);
  {
    try {
      (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8,arg9);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_15(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  meep::component *arg4 = (meep::component *) 0 ;
  meep::field_rfunction arg5 = (meep::field_rfunction) 0 ;
  void *arg6 = (void *) 0 ;
  meep::volume *arg7 = 0 ;
  meep::h5file *arg8 = (meep::h5file *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int res6 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_output_hdf5" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__component, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_output_hdf5" "', argument " "4"" of type '" "meep::component const *""'"); 
  }
  arg4 = reinterpret_cast< meep::component * >(argp4);
  {
    int res = SWIG_ConvertFunctionPtr(obj4, (void**)(&arg5), SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_output_hdf5" "', argument " "5"" of type '" "meep::field_rfunction""'"); 
    }
  }
  res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_output_hdf5" "', argument " "6"" of type '" "void *""'"); 
  }
  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  arg7 = reinterpret_cast< meep::volume * >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_output_hdf5" "', argument " "8"" of type '" "meep::h5file *""'"); 
  }
  arg8 = reinterpret_cast< meep::h5file * >(argp8);
  {
    try {
      (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_16(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  meep::component *arg4 = (meep::component *) 0 ;
  meep::field_rfunction arg5 = (meep::field_rfunction) 0 ;
  void *arg6 = (void *) 0 ;
  meep::volume *arg7 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int res6 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_output_hdf5" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__component, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_output_hdf5" "', argument " "4"" of type '" "meep::component const *""'"); 
  }
  arg4 = reinterpret_cast< meep::component * >(argp4);
  {
    int res = SWIG_ConvertFunctionPtr(obj4, (void**)(&arg5), SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_output_hdf5" "', argument " "5"" of type '" "meep::field_rfunction""'"); 
    }
  }
  res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_output_hdf5" "', argument " "6"" of type '" "void *""'"); 
  }
  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "meep::volume const &""'"); 
  }
  arg7 = reinterpret_cast< meep::volume * >(argp7);
  {
    try {
      (arg1)->output_hdf5((char const *)arg2,arg3,(meep::component const *)arg4,arg5,arg6,(meep::volume const &)*arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_17(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  meep::h5file *arg4 = (meep::h5file *) 0 ;
  bool arg5 ;
  bool arg6 ;
  char *arg7 = (char *) 0 ;
  double arg8 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  int res7 ;
  char *buf7 = 0 ;
  int alloc7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_output_hdf5" "', argument " "4"" of type '" "meep::h5file *""'"); 
  }
  arg4 = reinterpret_cast< meep::h5file * >(argp4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_output_hdf5" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_output_hdf5" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  res7 = SWIG_AsCharPtrAndSize(obj6, &buf7, NULL, &alloc7);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "char const *""'");
  }
  arg7 = reinterpret_cast< char * >(buf7);
  ecode8 = SWIG_AsVal_double(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_output_hdf5" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  {
    try {
      (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,(char const *)arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
  return resultobj;
fail:
  if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_18(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  meep::h5file *arg4 = (meep::h5file *) 0 ;
  bool arg5 ;
  bool arg6 ;
  char *arg7 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  int res7 ;
  char *buf7 = 0 ;
  int alloc7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_output_hdf5" "', argument " "4"" of type '" "meep::h5file *""'"); 
  }
  arg4 = reinterpret_cast< meep::h5file * >(argp4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_output_hdf5" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_output_hdf5" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  res7 = SWIG_AsCharPtrAndSize(obj6, &buf7, NULL, &alloc7);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "char const *""'");
  }
  arg7 = reinterpret_cast< char * >(buf7);
  {
    try {
      (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,(char const *)arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
  return resultobj;
fail:
  if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_19(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  meep::h5file *arg4 = (meep::h5file *) 0 ;
  bool arg5 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_output_hdf5" "', argument " "4"" of type '" "meep::h5file *""'"); 
  }
  arg4 = reinterpret_cast< meep::h5file * >(argp4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_output_hdf5" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_output_hdf5" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_20(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  meep::h5file *arg4 = (meep::h5file *) 0 ;
  bool arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_output_hdf5" "', argument " "4"" of type '" "meep::h5file *""'"); 
  }
  arg4 = reinterpret_cast< meep::h5file * >(argp4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_output_hdf5" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  {
    try {
      (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_21(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  meep::h5file *arg4 = (meep::h5file *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_output_hdf5" "', argument " "4"" of type '" "meep::h5file *""'"); 
  }
  arg4 = reinterpret_cast< meep::h5file * >(argp4);
  {
    try {
      (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_22(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    try {
      (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_23(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::derived_component arg2 ;
  meep::volume *arg3 = 0 ;
  meep::h5file *arg4 = (meep::h5file *) 0 ;
  bool arg5 ;
  bool arg6 ;
  char *arg7 = (char *) 0 ;
  double arg8 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  int res7 ;
  char *buf7 = 0 ;
  int alloc7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::derived_component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_output_hdf5" "', argument " "4"" of type '" "meep::h5file *""'"); 
  }
  arg4 = reinterpret_cast< meep::h5file * >(argp4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_output_hdf5" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_output_hdf5" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  res7 = SWIG_AsCharPtrAndSize(obj6, &buf7, NULL, &alloc7);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "char const *""'");
  }
  arg7 = reinterpret_cast< char * >(buf7);
  ecode8 = SWIG_AsVal_double(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_output_hdf5" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  {
    try {
      (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,(char const *)arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
  return resultobj;
fail:
  if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_24(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::derived_component arg2 ;
  meep::volume *arg3 = 0 ;
  meep::h5file *arg4 = (meep::h5file *) 0 ;
  bool arg5 ;
  bool arg6 ;
  char *arg7 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  int res7 ;
  char *buf7 = 0 ;
  int alloc7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::derived_component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_output_hdf5" "', argument " "4"" of type '" "meep::h5file *""'"); 
  }
  arg4 = reinterpret_cast< meep::h5file * >(argp4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_output_hdf5" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_output_hdf5" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  res7 = SWIG_AsCharPtrAndSize(obj6, &buf7, NULL, &alloc7);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_output_hdf5" "', argument " "7"" of type '" "char const *""'");
  }
  arg7 = reinterpret_cast< char * >(buf7);
  {
    try {
      (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,(char const *)arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
  return resultobj;
fail:
  if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_25(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::derived_component arg2 ;
  meep::volume *arg3 = 0 ;
  meep::h5file *arg4 = (meep::h5file *) 0 ;
  bool arg5 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::derived_component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_output_hdf5" "', argument " "4"" of type '" "meep::h5file *""'"); 
  }
  arg4 = reinterpret_cast< meep::h5file * >(argp4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_output_hdf5" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_output_hdf5" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_26(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::derived_component arg2 ;
  meep::volume *arg3 = 0 ;
  meep::h5file *arg4 = (meep::h5file *) 0 ;
  bool arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::derived_component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_output_hdf5" "', argument " "4"" of type '" "meep::h5file *""'"); 
  }
  arg4 = reinterpret_cast< meep::h5file * >(argp4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_output_hdf5" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  {
    try {
      (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_27(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::derived_component arg2 ;
  meep::volume *arg3 = 0 ;
  meep::h5file *arg4 = (meep::h5file *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::derived_component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__h5file, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_output_hdf5" "', argument " "4"" of type '" "meep::h5file *""'"); 
  }
  arg4 = reinterpret_cast< meep::h5file * >(argp4);
  {
    try {
      (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5__SWIG_28(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::derived_component arg2 ;
  meep::volume *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_hdf5", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_hdf5" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::derived_component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_hdf5" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    try {
      (arg1)->output_hdf5(arg2,(meep::volume const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_hdf5(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[13] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 12) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_fields_output_hdf5__SWIG_22(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) >= 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_fields_output_hdf5__SWIG_28(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) >= 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__h5file, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_fields_output_hdf5__SWIG_27(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__h5file, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_fields_output_hdf5__SWIG_21(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PySequence_Check(argv[2]) &&
          PySequence_Check(PyList_GetItem(argv[2], 0)) &&
          PyCallable_Check(PyList_GetItem(argv[2], 1));
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_fields_output_hdf5__SWIG_10(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) >= 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__h5file, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_output_hdf5__SWIG_26(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__h5file, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_output_hdf5__SWIG_20(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PySequence_Check(argv[2]) &&
          PySequence_Check(PyList_GetItem(argv[2], 0)) &&
          PyCallable_Check(PyList_GetItem(argv[2], 1));
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_meep__h5file, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_fields_output_hdf5__SWIG_9(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) >= 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__h5file, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_output_hdf5__SWIG_25(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__h5file, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            _v = PySequence_Check(argv[3]) &&
            PySequence_Check(PyList_GetItem(argv[3], 0)) &&
            PyCallable_Check(PyList_GetItem(argv[3], 1));
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              int res = SWIG_ConvertPtr(argv[5], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                return _wrap_fields_output_hdf5__SWIG_3(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__h5file, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_output_hdf5__SWIG_19(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PySequence_Check(argv[2]) &&
          PySequence_Check(PyList_GetItem(argv[2], 0)) &&
          PyCallable_Check(PyList_GetItem(argv[2], 1));
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_meep__h5file, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_output_hdf5__SWIG_8(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) >= 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__h5file, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                int res = SWIG_AsCharPtrAndSize(argv[6], 0, NULL, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  return _wrap_fields_output_hdf5__SWIG_24(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__h5file, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            _v = PySequence_Check(argv[3]) &&
            PySequence_Check(PyList_GetItem(argv[3], 0)) &&
            PyCallable_Check(PyList_GetItem(argv[3], 1));
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              int res = SWIG_ConvertPtr(argv[5], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_fields_output_hdf5__SWIG_2(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__h5file, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                int res = SWIG_AsCharPtrAndSize(argv[6], 0, NULL, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  return _wrap_fields_output_hdf5__SWIG_18(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PySequence_Check(argv[2]) &&
          PySequence_Check(PyList_GetItem(argv[2], 0)) &&
          PyCallable_Check(PyList_GetItem(argv[2], 1));
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_meep__h5file, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_fields_output_hdf5__SWIG_7(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            _v = PyList_Check(argv[3]);
          }
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertFunctionPtr(argv[4], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
            _v = SWIG_CheckState(res);
            if (_v) {
              void *ptr = 0;
              int res = SWIG_ConvertPtr(argv[5], &ptr, 0, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                int res = SWIG_ConvertPtr(argv[6], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  return _wrap_fields_output_hdf5__SWIG_16(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__h5file, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            _v = PySequence_Check(argv[3]) &&
            PySequence_Check(PyList_GetItem(argv[3], 0)) &&
            PyCallable_Check(PyList_GetItem(argv[3], 1));
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              int res = SWIG_ConvertPtr(argv[5], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_bool(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    return _wrap_fields_output_hdf5__SWIG_1(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__h5file, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                int res = SWIG_AsCharPtrAndSize(argv[6], 0, NULL, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  {
                    int res = SWIG_AsVal_double(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    return _wrap_fields_output_hdf5__SWIG_17(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) >= 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__h5file, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                int res = SWIG_AsCharPtrAndSize(argv[6], 0, NULL, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  {
                    int res = SWIG_AsVal_double(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    return _wrap_fields_output_hdf5__SWIG_23(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PySequence_Check(argv[2]) &&
          PySequence_Check(PyList_GetItem(argv[2], 0)) &&
          PyCallable_Check(PyList_GetItem(argv[2], 1));
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_meep__h5file, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  int res = SWIG_AsCharPtrAndSize(argv[7], 0, NULL, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    return _wrap_fields_output_hdf5__SWIG_6(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            _v = PyList_Check(argv[3]);
          }
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertFunctionPtr(argv[4], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
            _v = SWIG_CheckState(res);
            if (_v) {
              void *ptr = 0;
              int res = SWIG_ConvertPtr(argv[5], &ptr, 0, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                int res = SWIG_ConvertPtr(argv[6], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_meep__h5file, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    return _wrap_fields_output_hdf5__SWIG_15(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 9) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__h5file, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            _v = PySequence_Check(argv[3]) &&
            PySequence_Check(PyList_GetItem(argv[3], 0)) &&
            PyCallable_Check(PyList_GetItem(argv[3], 1));
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              int res = SWIG_ConvertPtr(argv[5], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_bool(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    {
                      int res = SWIG_AsVal_double(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      return _wrap_fields_output_hdf5__SWIG_0(self, args);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 9) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PySequence_Check(argv[2]) &&
          PySequence_Check(PyList_GetItem(argv[2], 0)) &&
          PyCallable_Check(PyList_GetItem(argv[2], 1));
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_meep__h5file, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  int res = SWIG_AsCharPtrAndSize(argv[7], 0, NULL, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    {
                      int res = SWIG_AsVal_bool(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      return _wrap_fields_output_hdf5__SWIG_5(self, args);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 9) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            _v = PyList_Check(argv[3]);
          }
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertFunctionPtr(argv[4], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
            _v = SWIG_CheckState(res);
            if (_v) {
              void *ptr = 0;
              int res = SWIG_ConvertPtr(argv[5], &ptr, 0, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                int res = SWIG_ConvertPtr(argv[6], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_meep__h5file, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    {
                      int res = SWIG_AsVal_bool(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      return _wrap_fields_output_hdf5__SWIG_14(self, args);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 10) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PySequence_Check(argv[2]) &&
          PySequence_Check(PyList_GetItem(argv[2], 0)) &&
          PyCallable_Check(PyList_GetItem(argv[2], 1));
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_meep__h5file, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  int res = SWIG_AsCharPtrAndSize(argv[7], 0, NULL, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    {
                      int res = SWIG_AsVal_bool(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        int res = SWIG_AsVal_double(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        return _wrap_fields_output_hdf5__SWIG_4(self, args);
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 10) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            _v = PyList_Check(argv[3]);
          }
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertFunctionPtr(argv[4], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
            _v = SWIG_CheckState(res);
            if (_v) {
              void *ptr = 0;
              int res = SWIG_ConvertPtr(argv[5], &ptr, 0, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                int res = SWIG_ConvertPtr(argv[6], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_meep__h5file, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    {
                      int res = SWIG_AsVal_bool(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        int res = SWIG_AsVal_bool(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        return _wrap_fields_output_hdf5__SWIG_13(self, args);
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 11) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            _v = PyList_Check(argv[3]);
          }
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertFunctionPtr(argv[4], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
            _v = SWIG_CheckState(res);
            if (_v) {
              void *ptr = 0;
              int res = SWIG_ConvertPtr(argv[5], &ptr, 0, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                int res = SWIG_ConvertPtr(argv[6], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_meep__h5file, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    {
                      int res = SWIG_AsVal_bool(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        int res = SWIG_AsVal_bool(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        int res = SWIG_AsCharPtrAndSize(argv[10], 0, NULL, 0);
                        _v = SWIG_CheckState(res);
                        if (_v) {
                          return _wrap_fields_output_hdf5__SWIG_12(self, args);
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 12) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            _v = PyList_Check(argv[3]);
          }
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertFunctionPtr(argv[4], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
            _v = SWIG_CheckState(res);
            if (_v) {
              void *ptr = 0;
              int res = SWIG_ConvertPtr(argv[5], &ptr, 0, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                int res = SWIG_ConvertPtr(argv[6], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_meep__h5file, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    {
                      int res = SWIG_AsVal_bool(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        int res = SWIG_AsVal_bool(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        int res = SWIG_AsCharPtrAndSize(argv[10], 0, NULL, 0);
                        _v = SWIG_CheckState(res);
                        if (_v) {
                          {
                            int res = SWIG_AsVal_double(argv[11], NULL);
                            _v = SWIG_CheckState(res);
                          }
                          if (_v) {
                            return _wrap_fields_output_hdf5__SWIG_11(self, args);
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_output_hdf5'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::output_hdf5(meep::h5file *,char const *,int,meep::component const *,meep::field_function,void *,int,meep::volume const &,bool,bool,double)\n"
    "    meep::fields::output_hdf5(meep::h5file *,char const *,int,meep::component const *,meep::field_function,void *,int,meep::volume const &,bool,bool)\n"
    "    meep::fields::output_hdf5(meep::h5file *,char const *,int,meep::component const *,meep::field_function,void *,int,meep::volume const &,bool)\n"
    "    meep::fields::output_hdf5(meep::h5file *,char const *,int,meep::component const *,meep::field_function,void *,int,meep::volume const &)\n"
    "    meep::fields::output_hdf5(char const *,int,meep::component const *,meep::field_function,void *,meep::volume const &,meep::h5file *,bool,bool,char const *,bool,double)\n"
    "    meep::fields::output_hdf5(char const *,int,meep::component const *,meep::field_function,void *,meep::volume const &,meep::h5file *,bool,bool,char const *,bool)\n"
    "    meep::fields::output_hdf5(char const *,int,meep::component const *,meep::field_function,void *,meep::volume const &,meep::h5file *,bool,bool,char const *)\n"
    "    meep::fields::output_hdf5(char const *,int,meep::component const *,meep::field_function,void *,meep::volume const &,meep::h5file *,bool,bool)\n"
    "    meep::fields::output_hdf5(char const *,int,meep::component const *,meep::field_function,void *,meep::volume const &,meep::h5file *,bool)\n"
    "    meep::fields::output_hdf5(char const *,int,meep::component const *,meep::field_function,void *,meep::volume const &,meep::h5file *)\n"
    "    meep::fields::output_hdf5(char const *,int,meep::component const *,meep::field_function,void *,meep::volume const &)\n"
    "    meep::fields::output_hdf5(char const *,int,meep::component const *,meep::field_rfunction,void *,meep::volume const &,meep::h5file *,bool,bool,char const *,double)\n"
    "    meep::fields::output_hdf5(char const *,int,meep::component const *,meep::field_rfunction,void *,meep::volume const &,meep::h5file *,bool,bool,char const *)\n"
    "    meep::fields::output_hdf5(char const *,int,meep::component const *,meep::field_rfunction,void *,meep::volume const &,meep::h5file *,bool,bool)\n"
    "    meep::fields::output_hdf5(char const *,int,meep::component const *,meep::field_rfunction,void *,meep::volume const &,meep::h5file *,bool)\n"
    "    meep::fields::output_hdf5(char const *,int,meep::component const *,meep::field_rfunction,void *,meep::volume const &,meep::h5file *)\n"
    "    meep::fields::output_hdf5(char const *,int,meep::component const *,meep::field_rfunction,void *,meep::volume const &)\n"
    "    meep::fields::output_hdf5(meep::component,meep::volume const &,meep::h5file *,bool,bool,char const *,double)\n"
    "    meep::fields::output_hdf5(meep::component,meep::volume const &,meep::h5file *,bool,bool,char const *)\n"
    "    meep::fields::output_hdf5(meep::component,meep::volume const &,meep::h5file *,bool,bool)\n"
    "    meep::fields::output_hdf5(meep::component,meep::volume const &,meep::h5file *,bool)\n"
    "    meep::fields::output_hdf5(meep::component,meep::volume const &,meep::h5file *)\n"
    "    meep::fields::output_hdf5(meep::component,meep::volume const &)\n"
    "    meep::fields::output_hdf5(meep::derived_component,meep::volume const &,meep::h5file *,bool,bool,char const *,double)\n"
    "    meep::fields::output_hdf5(meep::derived_component,meep::volume const &,meep::h5file *,bool,bool,char const *)\n"
    "    meep::fields::output_hdf5(meep::derived_component,meep::volume const &,meep::h5file *,bool,bool)\n"
    "    meep::fields::output_hdf5(meep::derived_component,meep::volume const &,meep::h5file *,bool)\n"
    "    meep::fields::output_hdf5(meep::derived_component,meep::volume const &,meep::h5file *)\n"
    "    meep::fields::output_hdf5(meep::derived_component,meep::volume const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_open_h5file__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  meep::h5file::access_mode arg3 ;
  char *arg4 = (char *) 0 ;
  bool arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  meep::h5file *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_open_h5file", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_open_h5file" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_open_h5file" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_open_h5file" "', argument " "3"" of type '" "meep::h5file::access_mode""'");
  } 
  arg3 = static_cast< meep::h5file::access_mode >(val3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_open_h5file" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_open_h5file" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  {
    try {
      result = (meep::h5file *)(arg1)->open_h5file((char const *)arg2,arg3,(char const *)arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__h5file, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_open_h5file__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  meep::h5file::access_mode arg3 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::h5file *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_open_h5file", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_open_h5file" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_open_h5file" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_open_h5file" "', argument " "3"" of type '" "meep::h5file::access_mode""'");
  } 
  arg3 = static_cast< meep::h5file::access_mode >(val3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_open_h5file" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = reinterpret_cast< char * >(buf4);
  {
    try {
      result = (meep::h5file *)(arg1)->open_h5file((char const *)arg2,arg3,(char const *)arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__h5file, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_open_h5file__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  meep::h5file::access_mode arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::h5file *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_open_h5file", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_open_h5file" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_open_h5file" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_open_h5file" "', argument " "3"" of type '" "meep::h5file::access_mode""'");
  } 
  arg3 = static_cast< meep::h5file::access_mode >(val3);
  {
    try {
      result = (meep::h5file *)(arg1)->open_h5file((char const *)arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__h5file, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_open_h5file__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::h5file *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_open_h5file", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_open_h5file" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_open_h5file" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try {
      result = (meep::h5file *)(arg1)->open_h5file((char const *)arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__h5file, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_open_h5file(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_fields_open_h5file__SWIG_3(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_fields_open_h5file__SWIG_2(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_fields_open_h5file__SWIG_1(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_open_h5file__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_open_h5file'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::open_h5file(char const *,meep::h5file::access_mode,char const *,bool)\n"
    "    meep::fields::open_h5file(char const *,meep::h5file::access_mode,char const *)\n"
    "    meep::fields::open_h5file(char const *,meep::h5file::access_mode)\n"
    "    meep::fields::open_h5file(char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_h5file_name__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  bool arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_h5file_name", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_h5file_name" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_h5file_name" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_h5file_name" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_h5file_name" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  {
    try {
      result = (char *)(arg1)->h5file_name((char const *)arg2,(char const *)arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_h5file_name__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_h5file_name", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_h5file_name" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_h5file_name" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_h5file_name" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try {
      result = (char *)(arg1)->h5file_name((char const *)arg2,(char const *)arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_h5file_name__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_h5file_name", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_h5file_name" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_h5file_name" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try {
      result = (char *)(arg1)->h5file_name((char const *)arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_h5file_name(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_fields_h5file_name__SWIG_2(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_fields_h5file_name__SWIG_1(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_fields_h5file_name__SWIG_0(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_h5file_name'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::h5file_name(char const *,char const *,bool)\n"
    "    meep::fields::h5file_name(char const *,char const *)\n"
    "    meep::fields::h5file_name(char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_output_times(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_times", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_times" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_output_times" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try {
      (arg1)->output_times((char const *)arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_array_slice_dimensions__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  size_t *arg3 ;
  meep::direction *arg4 ;
  bool arg5 ;
  bool arg6 ;
  meep::vec *arg7 = (meep::vec *) 0 ;
  void *arg8 = (void *) 0 ;
  meep::component arg9 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  int res8 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_array_slice_dimensions", 9, 9, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_array_slice_dimensions" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_array_slice_dimensions" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_array_slice_dimensions" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    arg3 = (size_t *)array_data(obj2);
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__direction, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_get_array_slice_dimensions" "', argument " "4"" of type '" "meep::direction [3]""'"); 
  } 
  arg4 = reinterpret_cast< meep::direction * >(argp4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_get_array_slice_dimensions" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_get_array_slice_dimensions" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_get_array_slice_dimensions" "', argument " "7"" of type '" "meep::vec *""'"); 
  }
  arg7 = reinterpret_cast< meep::vec * >(argp7);
  res8 = SWIG_ConvertPtr(obj7,SWIG_as_voidptrptr(&arg8), 0, 0);
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_get_array_slice_dimensions" "', argument " "8"" of type '" "void *""'"); 
  }
  {
    arg9 = static_cast<meep::component>(PyInteger_AsLong(obj8));
  }
  {
    try {
      result = (int)(arg1)->get_array_slice_dimensions((meep::volume const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_array_slice_dimensions__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  size_t *arg3 ;
  meep::direction *arg4 ;
  bool arg5 ;
  bool arg6 ;
  meep::vec *arg7 = (meep::vec *) 0 ;
  void *arg8 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  int res8 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_array_slice_dimensions", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_array_slice_dimensions" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_array_slice_dimensions" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_array_slice_dimensions" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    arg3 = (size_t *)array_data(obj2);
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__direction, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_get_array_slice_dimensions" "', argument " "4"" of type '" "meep::direction [3]""'"); 
  } 
  arg4 = reinterpret_cast< meep::direction * >(argp4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_get_array_slice_dimensions" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_get_array_slice_dimensions" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_get_array_slice_dimensions" "', argument " "7"" of type '" "meep::vec *""'"); 
  }
  arg7 = reinterpret_cast< meep::vec * >(argp7);
  res8 = SWIG_ConvertPtr(obj7,SWIG_as_voidptrptr(&arg8), 0, 0);
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_get_array_slice_dimensions" "', argument " "8"" of type '" "void *""'"); 
  }
  {
    try {
      result = (int)(arg1)->get_array_slice_dimensions((meep::volume const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_array_slice_dimensions__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  size_t *arg3 ;
  meep::direction *arg4 ;
  bool arg5 ;
  bool arg6 ;
  meep::vec *arg7 = (meep::vec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_array_slice_dimensions", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_array_slice_dimensions" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_array_slice_dimensions" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_array_slice_dimensions" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    arg3 = (size_t *)array_data(obj2);
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__direction, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_get_array_slice_dimensions" "', argument " "4"" of type '" "meep::direction [3]""'"); 
  } 
  arg4 = reinterpret_cast< meep::direction * >(argp4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_get_array_slice_dimensions" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_get_array_slice_dimensions" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_get_array_slice_dimensions" "', argument " "7"" of type '" "meep::vec *""'"); 
  }
  arg7 = reinterpret_cast< meep::vec * >(argp7);
  {
    try {
      result = (int)(arg1)->get_array_slice_dimensions((meep::volume const &)*arg2,arg3,arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_array_slice_dimensions__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  size_t *arg3 ;
  meep::direction *arg4 ;
  bool arg5 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_array_slice_dimensions", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_array_slice_dimensions" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_array_slice_dimensions" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_array_slice_dimensions" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    arg3 = (size_t *)array_data(obj2);
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__direction, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_get_array_slice_dimensions" "', argument " "4"" of type '" "meep::direction [3]""'"); 
  } 
  arg4 = reinterpret_cast< meep::direction * >(argp4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_get_array_slice_dimensions" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_get_array_slice_dimensions" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      result = (int)(arg1)->get_array_slice_dimensions((meep::volume const &)*arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_array_slice_dimensions__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  size_t *arg3 ;
  meep::direction *arg4 ;
  bool arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_array_slice_dimensions", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_array_slice_dimensions" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_array_slice_dimensions" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_array_slice_dimensions" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    arg3 = (size_t *)array_data(obj2);
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__direction, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_get_array_slice_dimensions" "', argument " "4"" of type '" "meep::direction [3]""'"); 
  } 
  arg4 = reinterpret_cast< meep::direction * >(argp4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_get_array_slice_dimensions" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  {
    try {
      result = (int)(arg1)->get_array_slice_dimensions((meep::volume const &)*arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_array_slice_dimensions__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  size_t *arg3 ;
  meep::direction *arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_array_slice_dimensions", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_array_slice_dimensions" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_array_slice_dimensions" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_array_slice_dimensions" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    arg3 = (size_t *)array_data(obj2);
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__direction, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_get_array_slice_dimensions" "', argument " "4"" of type '" "meep::direction [3]""'"); 
  } 
  arg4 = reinterpret_cast< meep::direction * >(argp4);
  {
    try {
      result = (int)(arg1)->get_array_slice_dimensions((meep::volume const &)*arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_array_slice_dimensions(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[10] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 9) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = is_array(argv[2]);
        }
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__direction, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_fields_get_array_slice_dimensions__SWIG_5(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = is_array(argv[2]);
        }
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__direction, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_get_array_slice_dimensions__SWIG_4(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = is_array(argv[2]);
        }
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__direction, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_get_array_slice_dimensions__SWIG_3(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = is_array(argv[2]);
        }
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__direction, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_meep__vec, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  return _wrap_fields_get_array_slice_dimensions__SWIG_2(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = is_array(argv[2]);
        }
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__direction, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_meep__vec, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *ptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &ptr, 0, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    return _wrap_fields_get_array_slice_dimensions__SWIG_1(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 9) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = is_array(argv[2]);
        }
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__direction, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_meep__vec, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *ptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &ptr, 0, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    {
                      _v = PyInteger_Check(argv[8]) && PyInteger_AsLong(argv[8]) < 100;
                    }
                    if (_v) {
                      return _wrap_fields_get_array_slice_dimensions__SWIG_0(self, args);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_get_array_slice_dimensions'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::get_array_slice_dimensions(meep::volume const &,size_t [3],meep::direction [3],bool,bool,meep::vec *,void *,meep::component)\n"
    "    meep::fields::get_array_slice_dimensions(meep::volume const &,size_t [3],meep::direction [3],bool,bool,meep::vec *,void *)\n"
    "    meep::fields::get_array_slice_dimensions(meep::volume const &,size_t [3],meep::direction [3],bool,bool,meep::vec *)\n"
    "    meep::fields::get_array_slice_dimensions(meep::volume const &,size_t [3],meep::direction [3],bool,bool)\n"
    "    meep::fields::get_array_slice_dimensions(meep::volume const &,size_t [3],meep::direction [3],bool)\n"
    "    meep::fields::get_array_slice_dimensions(meep::volume const &,size_t [3],meep::direction [3])\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_get_array_slice__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  SwigValueWrapper< std::vector< enum meep::component,std::allocator< enum meep::component > > > arg3 ;
  meep::field_rfunction arg4 = (meep::field_rfunction) 0 ;
  void *arg5 = (void *) 0 ;
  meep::realnum *arg6 = (meep::realnum *) 0 ;
  double arg7 ;
  bool arg8 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  int res5 ;
  double val7 ;
  int ecode7 = 0 ;
  bool val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  meep::realnum *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_array_slice", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_array_slice" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t,  0  | 0);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_array_slice" "', argument " "3"" of type '" "std::vector< meep::component,std::allocator< meep::component > >""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_array_slice" "', argument " "3"" of type '" "std::vector< meep::component,std::allocator< meep::component > >""'");
    } else {
      std::vector< meep::component,std::allocator< meep::component > > * temp = reinterpret_cast< std::vector< meep::component,std::allocator< meep::component > > * >(argp3);
      arg3 = *temp;
      if (SWIG_IsNewObj(res3)) delete temp;
    }
  }
  {
    int res = SWIG_ConvertFunctionPtr(obj3, (void**)(&arg4), SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_get_array_slice" "', argument " "4"" of type '" "meep::field_rfunction""'"); 
    }
  }
  res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_get_array_slice" "', argument " "5"" of type '" "void *""'"); 
  }
  {
    arg6 = (meep::realnum *)array_data(obj5);
  }
  ecode7 = SWIG_AsVal_double(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_get_array_slice" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  ecode8 = SWIG_AsVal_bool(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_get_array_slice" "', argument " "8"" of type '" "bool""'");
  } 
  arg8 = static_cast< bool >(val8);
  {
    try {
      result = (meep::realnum *)(arg1)->get_array_slice((meep::volume const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_array_slice__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  SwigValueWrapper< std::vector< enum meep::component,std::allocator< enum meep::component > > > arg3 ;
  meep::field_rfunction arg4 = (meep::field_rfunction) 0 ;
  void *arg5 = (void *) 0 ;
  meep::realnum *arg6 = (meep::realnum *) 0 ;
  double arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  int res5 ;
  double val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  meep::realnum *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_array_slice", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_array_slice" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t,  0  | 0);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_array_slice" "', argument " "3"" of type '" "std::vector< meep::component,std::allocator< meep::component > >""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_array_slice" "', argument " "3"" of type '" "std::vector< meep::component,std::allocator< meep::component > >""'");
    } else {
      std::vector< meep::component,std::allocator< meep::component > > * temp = reinterpret_cast< std::vector< meep::component,std::allocator< meep::component > > * >(argp3);
      arg3 = *temp;
      if (SWIG_IsNewObj(res3)) delete temp;
    }
  }
  {
    int res = SWIG_ConvertFunctionPtr(obj3, (void**)(&arg4), SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_get_array_slice" "', argument " "4"" of type '" "meep::field_rfunction""'"); 
    }
  }
  res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_get_array_slice" "', argument " "5"" of type '" "void *""'"); 
  }
  {
    arg6 = (meep::realnum *)array_data(obj5);
  }
  ecode7 = SWIG_AsVal_double(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_get_array_slice" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  {
    try {
      result = (meep::realnum *)(arg1)->get_array_slice((meep::volume const &)*arg2,arg3,arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_array_slice__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  SwigValueWrapper< std::vector< enum meep::component,std::allocator< enum meep::component > > > arg3 ;
  meep::field_rfunction arg4 = (meep::field_rfunction) 0 ;
  void *arg5 = (void *) 0 ;
  meep::realnum *arg6 = (meep::realnum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  int res5 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  meep::realnum *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_array_slice", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_array_slice" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t,  0  | 0);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_array_slice" "', argument " "3"" of type '" "std::vector< meep::component,std::allocator< meep::component > >""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_array_slice" "', argument " "3"" of type '" "std::vector< meep::component,std::allocator< meep::component > >""'");
    } else {
      std::vector< meep::component,std::allocator< meep::component > > * temp = reinterpret_cast< std::vector< meep::component,std::allocator< meep::component > > * >(argp3);
      arg3 = *temp;
      if (SWIG_IsNewObj(res3)) delete temp;
    }
  }
  {
    int res = SWIG_ConvertFunctionPtr(obj3, (void**)(&arg4), SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_get_array_slice" "', argument " "4"" of type '" "meep::field_rfunction""'"); 
    }
  }
  res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_get_array_slice" "', argument " "5"" of type '" "void *""'"); 
  }
  {
    arg6 = (meep::realnum *)array_data(obj5);
  }
  {
    try {
      result = (meep::realnum *)(arg1)->get_array_slice((meep::volume const &)*arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_array_slice__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  SwigValueWrapper< std::vector< enum meep::component,std::allocator< enum meep::component > > > arg3 ;
  meep::field_rfunction arg4 = (meep::field_rfunction) 0 ;
  void *arg5 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  int res5 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  meep::realnum *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_array_slice", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_array_slice" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t,  0  | 0);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_array_slice" "', argument " "3"" of type '" "std::vector< meep::component,std::allocator< meep::component > >""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_array_slice" "', argument " "3"" of type '" "std::vector< meep::component,std::allocator< meep::component > >""'");
    } else {
      std::vector< meep::component,std::allocator< meep::component > > * temp = reinterpret_cast< std::vector< meep::component,std::allocator< meep::component > > * >(argp3);
      arg3 = *temp;
      if (SWIG_IsNewObj(res3)) delete temp;
    }
  }
  {
    int res = SWIG_ConvertFunctionPtr(obj3, (void**)(&arg4), SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_get_array_slice" "', argument " "4"" of type '" "meep::field_rfunction""'"); 
    }
  }
  res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_get_array_slice" "', argument " "5"" of type '" "void *""'"); 
  }
  {
    try {
      result = (meep::realnum *)(arg1)->get_array_slice((meep::volume const &)*arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_complex_array_slice__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  SwigValueWrapper< std::vector< enum meep::component,std::allocator< enum meep::component > > > arg3 ;
  meep::field_function arg4 = (meep::field_function) 0 ;
  void *arg5 = (void *) 0 ;
  std::complex< meep::realnum > *arg6 = (std::complex< meep::realnum > *) 0 ;
  double arg7 ;
  bool arg8 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  int res5 ;
  double val7 ;
  int ecode7 = 0 ;
  bool val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  std::complex< meep::realnum > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_complex_array_slice", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_complex_array_slice" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_complex_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_complex_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t,  0  | 0);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_complex_array_slice" "', argument " "3"" of type '" "std::vector< meep::component,std::allocator< meep::component > >""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_complex_array_slice" "', argument " "3"" of type '" "std::vector< meep::component,std::allocator< meep::component > >""'");
    } else {
      std::vector< meep::component,std::allocator< meep::component > > * temp = reinterpret_cast< std::vector< meep::component,std::allocator< meep::component > > * >(argp3);
      arg3 = *temp;
      if (SWIG_IsNewObj(res3)) delete temp;
    }
  }
  {
    int res = SWIG_ConvertFunctionPtr(obj3, (void**)(&arg4), SWIGTYPE_p_f_p_q_const__std__complex__meep__realnum___r_q_const__meep__vec_p_void__std__complexT_double_t);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_get_complex_array_slice" "', argument " "4"" of type '" "meep::field_function""'"); 
    }
  }
  res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_get_complex_array_slice" "', argument " "5"" of type '" "void *""'"); 
  }
  {
    arg6 = (std::complex<meep::realnum> *)array_data(obj5);
  }
  ecode7 = SWIG_AsVal_double(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_get_complex_array_slice" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  ecode8 = SWIG_AsVal_bool(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_get_complex_array_slice" "', argument " "8"" of type '" "bool""'");
  } 
  arg8 = static_cast< bool >(val8);
  {
    try {
      result = (std::complex< meep::realnum > *)(arg1)->get_complex_array_slice((meep::volume const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_complex_array_slice__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  SwigValueWrapper< std::vector< enum meep::component,std::allocator< enum meep::component > > > arg3 ;
  meep::field_function arg4 = (meep::field_function) 0 ;
  void *arg5 = (void *) 0 ;
  std::complex< meep::realnum > *arg6 = (std::complex< meep::realnum > *) 0 ;
  double arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  int res5 ;
  double val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  std::complex< meep::realnum > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_complex_array_slice", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_complex_array_slice" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_complex_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_complex_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t,  0  | 0);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_complex_array_slice" "', argument " "3"" of type '" "std::vector< meep::component,std::allocator< meep::component > >""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_complex_array_slice" "', argument " "3"" of type '" "std::vector< meep::component,std::allocator< meep::component > >""'");
    } else {
      std::vector< meep::component,std::allocator< meep::component > > * temp = reinterpret_cast< std::vector< meep::component,std::allocator< meep::component > > * >(argp3);
      arg3 = *temp;
      if (SWIG_IsNewObj(res3)) delete temp;
    }
  }
  {
    int res = SWIG_ConvertFunctionPtr(obj3, (void**)(&arg4), SWIGTYPE_p_f_p_q_const__std__complex__meep__realnum___r_q_const__meep__vec_p_void__std__complexT_double_t);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_get_complex_array_slice" "', argument " "4"" of type '" "meep::field_function""'"); 
    }
  }
  res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_get_complex_array_slice" "', argument " "5"" of type '" "void *""'"); 
  }
  {
    arg6 = (std::complex<meep::realnum> *)array_data(obj5);
  }
  ecode7 = SWIG_AsVal_double(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_get_complex_array_slice" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  {
    try {
      result = (std::complex< meep::realnum > *)(arg1)->get_complex_array_slice((meep::volume const &)*arg2,arg3,arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_complex_array_slice__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  SwigValueWrapper< std::vector< enum meep::component,std::allocator< enum meep::component > > > arg3 ;
  meep::field_function arg4 = (meep::field_function) 0 ;
  void *arg5 = (void *) 0 ;
  std::complex< meep::realnum > *arg6 = (std::complex< meep::realnum > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  int res5 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  std::complex< meep::realnum > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_complex_array_slice", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_complex_array_slice" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_complex_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_complex_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t,  0  | 0);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_complex_array_slice" "', argument " "3"" of type '" "std::vector< meep::component,std::allocator< meep::component > >""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_complex_array_slice" "', argument " "3"" of type '" "std::vector< meep::component,std::allocator< meep::component > >""'");
    } else {
      std::vector< meep::component,std::allocator< meep::component > > * temp = reinterpret_cast< std::vector< meep::component,std::allocator< meep::component > > * >(argp3);
      arg3 = *temp;
      if (SWIG_IsNewObj(res3)) delete temp;
    }
  }
  {
    int res = SWIG_ConvertFunctionPtr(obj3, (void**)(&arg4), SWIGTYPE_p_f_p_q_const__std__complex__meep__realnum___r_q_const__meep__vec_p_void__std__complexT_double_t);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_get_complex_array_slice" "', argument " "4"" of type '" "meep::field_function""'"); 
    }
  }
  res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_get_complex_array_slice" "', argument " "5"" of type '" "void *""'"); 
  }
  {
    arg6 = (std::complex<meep::realnum> *)array_data(obj5);
  }
  {
    try {
      result = (std::complex< meep::realnum > *)(arg1)->get_complex_array_slice((meep::volume const &)*arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_complex_array_slice__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  SwigValueWrapper< std::vector< enum meep::component,std::allocator< enum meep::component > > > arg3 ;
  meep::field_function arg4 = (meep::field_function) 0 ;
  void *arg5 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  int res5 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  std::complex< meep::realnum > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_complex_array_slice", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_complex_array_slice" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_complex_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_complex_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t,  0  | 0);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_complex_array_slice" "', argument " "3"" of type '" "std::vector< meep::component,std::allocator< meep::component > >""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_complex_array_slice" "', argument " "3"" of type '" "std::vector< meep::component,std::allocator< meep::component > >""'");
    } else {
      std::vector< meep::component,std::allocator< meep::component > > * temp = reinterpret_cast< std::vector< meep::component,std::allocator< meep::component > > * >(argp3);
      arg3 = *temp;
      if (SWIG_IsNewObj(res3)) delete temp;
    }
  }
  {
    int res = SWIG_ConvertFunctionPtr(obj3, (void**)(&arg4), SWIGTYPE_p_f_p_q_const__std__complex__meep__realnum___r_q_const__meep__vec_p_void__std__complexT_double_t);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_get_complex_array_slice" "', argument " "4"" of type '" "meep::field_function""'"); 
    }
  }
  res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_get_complex_array_slice" "', argument " "5"" of type '" "void *""'"); 
  }
  {
    try {
      result = (std::complex< meep::realnum > *)(arg1)->get_complex_array_slice((meep::volume const &)*arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_array_slice__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  meep::component arg3 ;
  meep::realnum *arg4 = (meep::realnum *) 0 ;
  double arg5 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  meep::realnum *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_array_slice", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_array_slice" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    arg3 = static_cast<meep::component>(PyInteger_AsLong(obj2));
  }
  {
    arg4 = (meep::realnum *)array_data(obj3);
  }
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_get_array_slice" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_get_array_slice" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      result = (meep::realnum *)(arg1)->get_array_slice((meep::volume const &)*arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_array_slice__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  meep::component arg3 ;
  meep::realnum *arg4 = (meep::realnum *) 0 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  meep::realnum *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_array_slice", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_array_slice" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    arg3 = static_cast<meep::component>(PyInteger_AsLong(obj2));
  }
  {
    arg4 = (meep::realnum *)array_data(obj3);
  }
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_get_array_slice" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      result = (meep::realnum *)(arg1)->get_array_slice((meep::volume const &)*arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_array_slice__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  meep::component arg3 ;
  meep::realnum *arg4 = (meep::realnum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::realnum *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_array_slice", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_array_slice" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    arg3 = static_cast<meep::component>(PyInteger_AsLong(obj2));
  }
  {
    arg4 = (meep::realnum *)array_data(obj3);
  }
  {
    try {
      result = (meep::realnum *)(arg1)->get_array_slice((meep::volume const &)*arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_array_slice__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  meep::component arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::realnum *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_array_slice", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_array_slice" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    arg3 = static_cast<meep::component>(PyInteger_AsLong(obj2));
  }
  {
    try {
      result = (meep::realnum *)(arg1)->get_array_slice((meep::volume const &)*arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_array_slice__SWIG_8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  meep::derived_component arg3 ;
  meep::realnum *arg4 = (meep::realnum *) 0 ;
  double arg5 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  meep::realnum *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_array_slice", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_array_slice" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    arg3 = static_cast<meep::derived_component>(PyInteger_AsLong(obj2));
  }
  {
    arg4 = (meep::realnum *)array_data(obj3);
  }
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_get_array_slice" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_get_array_slice" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      result = (meep::realnum *)(arg1)->get_array_slice((meep::volume const &)*arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_array_slice__SWIG_9(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  meep::derived_component arg3 ;
  meep::realnum *arg4 = (meep::realnum *) 0 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  meep::realnum *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_array_slice", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_array_slice" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    arg3 = static_cast<meep::derived_component>(PyInteger_AsLong(obj2));
  }
  {
    arg4 = (meep::realnum *)array_data(obj3);
  }
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_get_array_slice" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      result = (meep::realnum *)(arg1)->get_array_slice((meep::volume const &)*arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_array_slice__SWIG_10(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  meep::derived_component arg3 ;
  meep::realnum *arg4 = (meep::realnum *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::realnum *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_array_slice", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_array_slice" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    arg3 = static_cast<meep::derived_component>(PyInteger_AsLong(obj2));
  }
  {
    arg4 = (meep::realnum *)array_data(obj3);
  }
  {
    try {
      result = (meep::realnum *)(arg1)->get_array_slice((meep::volume const &)*arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_array_slice__SWIG_11(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  meep::derived_component arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::realnum *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_array_slice", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_array_slice" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    arg3 = static_cast<meep::derived_component>(PyInteger_AsLong(obj2));
  }
  {
    try {
      result = (meep::realnum *)(arg1)->get_array_slice((meep::volume const &)*arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_array_slice(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[9] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 8) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PyInteger_Check(argv[2]) && PyInteger_AsLong(argv[2]) < 100;
        }
        if (_v) {
          return _wrap_fields_get_array_slice__SWIG_7(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PyInteger_Check(argv[2]) && PyInteger_AsLong(argv[2]) >= 100;
        }
        if (_v) {
          return _wrap_fields_get_array_slice__SWIG_11(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PyInteger_Check(argv[2]) && PyInteger_AsLong(argv[2]) >= 100;
        }
        if (_v) {
          {
            _v = is_array(argv[3]);
          }
          if (_v) {
            return _wrap_fields_get_array_slice__SWIG_10(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PyInteger_Check(argv[2]) && PyInteger_AsLong(argv[2]) < 100;
        }
        if (_v) {
          {
            _v = is_array(argv[3]);
          }
          if (_v) {
            return _wrap_fields_get_array_slice__SWIG_6(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PyInteger_Check(argv[2]) && PyInteger_AsLong(argv[2]) >= 100;
        }
        if (_v) {
          {
            _v = is_array(argv[3]);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_get_array_slice__SWIG_9(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *ptr = 0;
          int res = SWIG_ConvertFunctionPtr(argv[3], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &ptr, 0, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_fields_get_array_slice__SWIG_3(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PyInteger_Check(argv[2]) && PyInteger_AsLong(argv[2]) < 100;
        }
        if (_v) {
          {
            _v = is_array(argv[3]);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_get_array_slice__SWIG_5(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PyInteger_Check(argv[2]) && PyInteger_AsLong(argv[2]) < 100;
        }
        if (_v) {
          {
            _v = is_array(argv[3]);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_get_array_slice__SWIG_4(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *ptr = 0;
          int res = SWIG_ConvertFunctionPtr(argv[3], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &ptr, 0, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                _v = is_array(argv[5]);
              }
              if (_v) {
                return _wrap_fields_get_array_slice__SWIG_2(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PyInteger_Check(argv[2]) && PyInteger_AsLong(argv[2]) >= 100;
        }
        if (_v) {
          {
            _v = is_array(argv[3]);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_get_array_slice__SWIG_8(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *ptr = 0;
          int res = SWIG_ConvertFunctionPtr(argv[3], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &ptr, 0, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                _v = is_array(argv[5]);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_double(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_fields_get_array_slice__SWIG_1(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *ptr = 0;
          int res = SWIG_ConvertFunctionPtr(argv[3], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &ptr, 0, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                _v = is_array(argv[5]);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_double(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_bool(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    return _wrap_fields_get_array_slice__SWIG_0(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_get_array_slice'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::get_array_slice(meep::volume const &,std::vector< meep::component,std::allocator< meep::component > >,meep::field_rfunction,void *,meep::realnum *,double,bool)\n"
    "    meep::fields::get_array_slice(meep::volume const &,std::vector< meep::component,std::allocator< meep::component > >,meep::field_rfunction,void *,meep::realnum *,double)\n"
    "    meep::fields::get_array_slice(meep::volume const &,std::vector< meep::component,std::allocator< meep::component > >,meep::field_rfunction,void *,meep::realnum *)\n"
    "    meep::fields::get_array_slice(meep::volume const &,std::vector< meep::component,std::allocator< meep::component > >,meep::field_rfunction,void *)\n"
    "    meep::fields::get_array_slice(meep::volume const &,meep::component,meep::realnum *,double,bool)\n"
    "    meep::fields::get_array_slice(meep::volume const &,meep::component,meep::realnum *,double)\n"
    "    meep::fields::get_array_slice(meep::volume const &,meep::component,meep::realnum *)\n"
    "    meep::fields::get_array_slice(meep::volume const &,meep::component)\n"
    "    meep::fields::get_array_slice(meep::volume const &,meep::derived_component,meep::realnum *,double,bool)\n"
    "    meep::fields::get_array_slice(meep::volume const &,meep::derived_component,meep::realnum *,double)\n"
    "    meep::fields::get_array_slice(meep::volume const &,meep::derived_component,meep::realnum *)\n"
    "    meep::fields::get_array_slice(meep::volume const &,meep::derived_component)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_get_complex_array_slice__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  meep::component arg3 ;
  std::complex< meep::realnum > *arg4 = (std::complex< meep::realnum > *) 0 ;
  double arg5 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  std::complex< meep::realnum > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_complex_array_slice", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_complex_array_slice" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_complex_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_complex_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    arg3 = static_cast<meep::component>(PyInteger_AsLong(obj2));
  }
  {
    arg4 = (std::complex<meep::realnum> *)array_data(obj3);
  }
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_get_complex_array_slice" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_get_complex_array_slice" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      result = (std::complex< meep::realnum > *)(arg1)->get_complex_array_slice((meep::volume const &)*arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_complex_array_slice__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  meep::component arg3 ;
  std::complex< meep::realnum > *arg4 = (std::complex< meep::realnum > *) 0 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  std::complex< meep::realnum > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_complex_array_slice", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_complex_array_slice" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_complex_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_complex_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    arg3 = static_cast<meep::component>(PyInteger_AsLong(obj2));
  }
  {
    arg4 = (std::complex<meep::realnum> *)array_data(obj3);
  }
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_get_complex_array_slice" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      result = (std::complex< meep::realnum > *)(arg1)->get_complex_array_slice((meep::volume const &)*arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_complex_array_slice__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  meep::component arg3 ;
  std::complex< meep::realnum > *arg4 = (std::complex< meep::realnum > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  std::complex< meep::realnum > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_complex_array_slice", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_complex_array_slice" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_complex_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_complex_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    arg3 = static_cast<meep::component>(PyInteger_AsLong(obj2));
  }
  {
    arg4 = (std::complex<meep::realnum> *)array_data(obj3);
  }
  {
    try {
      result = (std::complex< meep::realnum > *)(arg1)->get_complex_array_slice((meep::volume const &)*arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_complex_array_slice__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  meep::component arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::complex< meep::realnum > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_complex_array_slice", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_complex_array_slice" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_complex_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_complex_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    arg3 = static_cast<meep::component>(PyInteger_AsLong(obj2));
  }
  {
    try {
      result = (std::complex< meep::realnum > *)(arg1)->get_complex_array_slice((meep::volume const &)*arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_complex_array_slice(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[9] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 8) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PyInteger_Check(argv[2]) && PyInteger_AsLong(argv[2]) < 100;
        }
        if (_v) {
          return _wrap_fields_get_complex_array_slice__SWIG_7(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PyInteger_Check(argv[2]) && PyInteger_AsLong(argv[2]) < 100;
        }
        if (_v) {
          {
            _v = is_array(argv[3]);
          }
          if (_v) {
            return _wrap_fields_get_complex_array_slice__SWIG_6(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *ptr = 0;
          int res = SWIG_ConvertFunctionPtr(argv[3], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__meep__realnum___r_q_const__meep__vec_p_void__std__complexT_double_t);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &ptr, 0, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_fields_get_complex_array_slice__SWIG_3(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PyInteger_Check(argv[2]) && PyInteger_AsLong(argv[2]) < 100;
        }
        if (_v) {
          {
            _v = is_array(argv[3]);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_get_complex_array_slice__SWIG_5(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PyInteger_Check(argv[2]) && PyInteger_AsLong(argv[2]) < 100;
        }
        if (_v) {
          {
            _v = is_array(argv[3]);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_get_complex_array_slice__SWIG_4(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *ptr = 0;
          int res = SWIG_ConvertFunctionPtr(argv[3], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__meep__realnum___r_q_const__meep__vec_p_void__std__complexT_double_t);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &ptr, 0, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                _v = is_array(argv[5]);
              }
              if (_v) {
                return _wrap_fields_get_complex_array_slice__SWIG_2(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *ptr = 0;
          int res = SWIG_ConvertFunctionPtr(argv[3], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__meep__realnum___r_q_const__meep__vec_p_void__std__complexT_double_t);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &ptr, 0, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                _v = is_array(argv[5]);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_double(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_fields_get_complex_array_slice__SWIG_1(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *ptr = 0;
          int res = SWIG_ConvertFunctionPtr(argv[3], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__meep__realnum___r_q_const__meep__vec_p_void__std__complexT_double_t);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &ptr, 0, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                _v = is_array(argv[5]);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_double(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_bool(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    return _wrap_fields_get_complex_array_slice__SWIG_0(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_get_complex_array_slice'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::get_complex_array_slice(meep::volume const &,std::vector< meep::component,std::allocator< meep::component > >,meep::field_function,void *,std::complex< meep::realnum > *,double,bool)\n"
    "    meep::fields::get_complex_array_slice(meep::volume const &,std::vector< meep::component,std::allocator< meep::component > >,meep::field_function,void *,std::complex< meep::realnum > *,double)\n"
    "    meep::fields::get_complex_array_slice(meep::volume const &,std::vector< meep::component,std::allocator< meep::component > >,meep::field_function,void *,std::complex< meep::realnum > *)\n"
    "    meep::fields::get_complex_array_slice(meep::volume const &,std::vector< meep::component,std::allocator< meep::component > >,meep::field_function,void *)\n"
    "    meep::fields::get_complex_array_slice(meep::volume const &,meep::component,std::complex< meep::realnum > *,double,bool)\n"
    "    meep::fields::get_complex_array_slice(meep::volume const &,meep::component,std::complex< meep::realnum > *,double)\n"
    "    meep::fields::get_complex_array_slice(meep::volume const &,meep::component,std::complex< meep::realnum > *)\n"
    "    meep::fields::get_complex_array_slice(meep::volume const &,meep::component)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_get_source_slice__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  meep::component arg3 ;
  std::complex< meep::realnum > *arg4 = (std::complex< meep::realnum > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  std::complex< meep::realnum > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_source_slice", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_source_slice" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_source_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_source_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    arg3 = static_cast<meep::component>(PyInteger_AsLong(obj2));
  }
  {
    arg4 = (std::complex<meep::realnum> *)array_data(obj3);
  }
  {
    try {
      result = (std::complex< meep::realnum > *)(arg1)->get_source_slice((meep::volume const &)*arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_source_slice__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  meep::component arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::complex< meep::realnum > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_source_slice", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_source_slice" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_source_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_source_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    arg3 = static_cast<meep::component>(PyInteger_AsLong(obj2));
  }
  {
    try {
      result = (std::complex< meep::realnum > *)(arg1)->get_source_slice((meep::volume const &)*arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_source_slice(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PyInteger_Check(argv[2]) && PyInteger_AsLong(argv[2]) < 100;
        }
        if (_v) {
          return _wrap_fields_get_source_slice__SWIG_1(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PyInteger_Check(argv[2]) && PyInteger_AsLong(argv[2]) < 100;
        }
        if (_v) {
          {
            _v = is_array(argv[3]);
          }
          if (_v) {
            return _wrap_fields_get_source_slice__SWIG_0(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_get_source_slice'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::get_source_slice(meep::volume const &,meep::component,std::complex< meep::realnum > *)\n"
    "    meep::fields::get_source_slice(meep::volume const &,meep::component)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_do_get_array_slice__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  SwigValueWrapper< std::vector< enum meep::component,std::allocator< enum meep::component > > > arg3 ;
  meep::field_function arg4 = (meep::field_function) 0 ;
  meep::field_rfunction arg5 = (meep::field_rfunction) 0 ;
  void *arg6 = (void *) 0 ;
  void *arg7 = (void *) 0 ;
  double arg8 ;
  bool arg9 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  int res6 ;
  int res7 ;
  double val8 ;
  int ecode8 = 0 ;
  bool val9 ;
  int ecode9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_do_get_array_slice", 9, 9, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_do_get_array_slice" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_do_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_do_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t,  0  | 0);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_do_get_array_slice" "', argument " "3"" of type '" "std::vector< meep::component,std::allocator< meep::component > >""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_do_get_array_slice" "', argument " "3"" of type '" "std::vector< meep::component,std::allocator< meep::component > >""'");
    } else {
      std::vector< meep::component,std::allocator< meep::component > > * temp = reinterpret_cast< std::vector< meep::component,std::allocator< meep::component > > * >(argp3);
      arg3 = *temp;
      if (SWIG_IsNewObj(res3)) delete temp;
    }
  }
  {
    int res = SWIG_ConvertFunctionPtr(obj3, (void**)(&arg4), SWIGTYPE_p_f_p_q_const__std__complex__meep__realnum___r_q_const__meep__vec_p_void__std__complexT_double_t);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_do_get_array_slice" "', argument " "4"" of type '" "meep::field_function""'"); 
    }
  }
  {
    int res = SWIG_ConvertFunctionPtr(obj4, (void**)(&arg5), SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_do_get_array_slice" "', argument " "5"" of type '" "meep::field_rfunction""'"); 
    }
  }
  res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_do_get_array_slice" "', argument " "6"" of type '" "void *""'"); 
  }
  res7 = SWIG_ConvertPtr(obj6,SWIG_as_voidptrptr(&arg7), 0, 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_do_get_array_slice" "', argument " "7"" of type '" "void *""'"); 
  }
  ecode8 = SWIG_AsVal_double(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_do_get_array_slice" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  ecode9 = SWIG_AsVal_bool(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_do_get_array_slice" "', argument " "9"" of type '" "bool""'");
  } 
  arg9 = static_cast< bool >(val9);
  {
    try {
      result = (void *)(arg1)->do_get_array_slice((meep::volume const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_do_get_array_slice__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  SwigValueWrapper< std::vector< enum meep::component,std::allocator< enum meep::component > > > arg3 ;
  meep::field_function arg4 = (meep::field_function) 0 ;
  meep::field_rfunction arg5 = (meep::field_rfunction) 0 ;
  void *arg6 = (void *) 0 ;
  void *arg7 = (void *) 0 ;
  double arg8 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  int res6 ;
  int res7 ;
  double val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_do_get_array_slice", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_do_get_array_slice" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_do_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_do_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t,  0  | 0);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_do_get_array_slice" "', argument " "3"" of type '" "std::vector< meep::component,std::allocator< meep::component > >""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_do_get_array_slice" "', argument " "3"" of type '" "std::vector< meep::component,std::allocator< meep::component > >""'");
    } else {
      std::vector< meep::component,std::allocator< meep::component > > * temp = reinterpret_cast< std::vector< meep::component,std::allocator< meep::component > > * >(argp3);
      arg3 = *temp;
      if (SWIG_IsNewObj(res3)) delete temp;
    }
  }
  {
    int res = SWIG_ConvertFunctionPtr(obj3, (void**)(&arg4), SWIGTYPE_p_f_p_q_const__std__complex__meep__realnum___r_q_const__meep__vec_p_void__std__complexT_double_t);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_do_get_array_slice" "', argument " "4"" of type '" "meep::field_function""'"); 
    }
  }
  {
    int res = SWIG_ConvertFunctionPtr(obj4, (void**)(&arg5), SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_do_get_array_slice" "', argument " "5"" of type '" "meep::field_rfunction""'"); 
    }
  }
  res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_do_get_array_slice" "', argument " "6"" of type '" "void *""'"); 
  }
  res7 = SWIG_ConvertPtr(obj6,SWIG_as_voidptrptr(&arg7), 0, 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_do_get_array_slice" "', argument " "7"" of type '" "void *""'"); 
  }
  ecode8 = SWIG_AsVal_double(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_do_get_array_slice" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  {
    try {
      result = (void *)(arg1)->do_get_array_slice((meep::volume const &)*arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_do_get_array_slice__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  SwigValueWrapper< std::vector< enum meep::component,std::allocator< enum meep::component > > > arg3 ;
  meep::field_function arg4 = (meep::field_function) 0 ;
  meep::field_rfunction arg5 = (meep::field_rfunction) 0 ;
  void *arg6 = (void *) 0 ;
  void *arg7 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  int res6 ;
  int res7 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_do_get_array_slice", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_do_get_array_slice" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_do_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_do_get_array_slice" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t,  0  | 0);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_do_get_array_slice" "', argument " "3"" of type '" "std::vector< meep::component,std::allocator< meep::component > >""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_do_get_array_slice" "', argument " "3"" of type '" "std::vector< meep::component,std::allocator< meep::component > >""'");
    } else {
      std::vector< meep::component,std::allocator< meep::component > > * temp = reinterpret_cast< std::vector< meep::component,std::allocator< meep::component > > * >(argp3);
      arg3 = *temp;
      if (SWIG_IsNewObj(res3)) delete temp;
    }
  }
  {
    int res = SWIG_ConvertFunctionPtr(obj3, (void**)(&arg4), SWIGTYPE_p_f_p_q_const__std__complex__meep__realnum___r_q_const__meep__vec_p_void__std__complexT_double_t);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_do_get_array_slice" "', argument " "4"" of type '" "meep::field_function""'"); 
    }
  }
  {
    int res = SWIG_ConvertFunctionPtr(obj4, (void**)(&arg5), SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_do_get_array_slice" "', argument " "5"" of type '" "meep::field_rfunction""'"); 
    }
  }
  res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_do_get_array_slice" "', argument " "6"" of type '" "void *""'"); 
  }
  res7 = SWIG_ConvertPtr(obj6,SWIG_as_voidptrptr(&arg7), 0, 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_do_get_array_slice" "', argument " "7"" of type '" "void *""'"); 
  }
  {
    try {
      result = (void *)(arg1)->do_get_array_slice((meep::volume const &)*arg2,arg3,arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_do_get_array_slice(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[10] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 9) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *ptr = 0;
          int res = SWIG_ConvertFunctionPtr(argv[3], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__meep__realnum___r_q_const__meep__vec_p_void__std__complexT_double_t);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertFunctionPtr(argv[4], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
            _v = SWIG_CheckState(res);
            if (_v) {
              void *ptr = 0;
              int res = SWIG_ConvertPtr(argv[5], &ptr, 0, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                void *ptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &ptr, 0, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  return _wrap_fields_do_get_array_slice__SWIG_2(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *ptr = 0;
          int res = SWIG_ConvertFunctionPtr(argv[3], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__meep__realnum___r_q_const__meep__vec_p_void__std__complexT_double_t);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertFunctionPtr(argv[4], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
            _v = SWIG_CheckState(res);
            if (_v) {
              void *ptr = 0;
              int res = SWIG_ConvertPtr(argv[5], &ptr, 0, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                void *ptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &ptr, 0, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  {
                    int res = SWIG_AsVal_double(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    return _wrap_fields_do_get_array_slice__SWIG_1(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 9) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *ptr = 0;
          int res = SWIG_ConvertFunctionPtr(argv[3], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__meep__realnum___r_q_const__meep__vec_p_void__std__complexT_double_t);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertFunctionPtr(argv[4], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
            _v = SWIG_CheckState(res);
            if (_v) {
              void *ptr = 0;
              int res = SWIG_ConvertPtr(argv[5], &ptr, 0, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                void *ptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &ptr, 0, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  {
                    int res = SWIG_AsVal_double(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    {
                      int res = SWIG_AsVal_bool(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      return _wrap_fields_do_get_array_slice__SWIG_0(self, args);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_do_get_array_slice'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::do_get_array_slice(meep::volume const &,std::vector< meep::component,std::allocator< meep::component > >,meep::field_function,meep::field_rfunction,void *,void *,double,bool)\n"
    "    meep::fields::do_get_array_slice(meep::volume const &,std::vector< meep::component,std::allocator< meep::component > >,meep::field_function,meep::field_rfunction,void *,void *,double)\n"
    "    meep::fields::do_get_array_slice(meep::volume const &,std::vector< meep::component,std::allocator< meep::component > >,meep::field_function,meep::field_rfunction,void *,void *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_get_array_metadata(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< double,std::allocator< double > > result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_array_metadata", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_array_metadata" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_array_metadata" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_array_metadata" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    try {
      result = (arg1)->get_array_metadata((meep::volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    npy_intp vec_len = (npy_intp) (&result)->size();
    resultobj = PyArray_SimpleNew(1, &vec_len, NPY_DOUBLE);
    memcpy(PyArray_DATA((PyArrayObject*) resultobj), &result[0], vec_len * sizeof(double));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_last_step_output_wall_time_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_last_step_output_wall_time_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_last_step_output_wall_time_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_last_step_output_wall_time_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->last_step_output_wall_time = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_last_step_output_wall_time_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_last_step_output_wall_time_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_last_step_output_wall_time_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result = (double) ((arg1)->last_step_output_wall_time);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_last_step_output_t_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_last_step_output_t_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_last_step_output_t_set" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_last_step_output_t_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  if (arg1) (arg1)->last_step_output_t = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_last_step_output_t_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "fields_last_step_output_t_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_last_step_output_t_get" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  result = (int) ((arg1)->last_step_output_t);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_step(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_step", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_step" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      (arg1)->step();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_round_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_round_time", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_round_time" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      result = (double)((meep::fields const *)arg1)->round_time();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_time", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_time" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      result = (double)((meep::fields const *)arg1)->time();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_solve_cw__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double arg2 ;
  int arg3 ;
  std::complex< double > arg4 ;
  int arg5 ;
  std::complex< double > *arg6 = (std::complex< double > *) 0 ;
  double arg7 ;
  int arg8 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  std::complex< double > val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  int val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "fields_solve_cw", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_solve_cw" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_solve_cw" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_solve_cw" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_solve_cw" "', argument " "4"" of type '" "std::complex< double >""'");
  } 
  arg4 = static_cast< std::complex< double > >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_solve_cw" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    arg6 = (std::complex<double> *)array_data(obj5);
  }
  ecode7 = SWIG_AsVal_double(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_solve_cw" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  ecode8 = SWIG_AsVal_int(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_solve_cw" "', argument " "8"" of type '" "int""'");
  } 
  arg8 = static_cast< int >(val8);
  {
    try {
      result = (bool)(arg1)->solve_cw(arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_solve_cw__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double arg2 ;
  int arg3 ;
  std::complex< double > arg4 ;
  int arg5 ;
  std::complex< double > *arg6 = (std::complex< double > *) 0 ;
  double arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  std::complex< double > val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "fields_solve_cw", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_solve_cw" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_solve_cw" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_solve_cw" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_solve_cw" "', argument " "4"" of type '" "std::complex< double >""'");
  } 
  arg4 = static_cast< std::complex< double > >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_solve_cw" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    arg6 = (std::complex<double> *)array_data(obj5);
  }
  ecode7 = SWIG_AsVal_double(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_solve_cw" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  {
    try {
      result = (bool)(arg1)->solve_cw(arg2,arg3,arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_solve_cw__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double arg2 ;
  int arg3 ;
  std::complex< double > arg4 ;
  int arg5 ;
  std::complex< double > *arg6 = (std::complex< double > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  std::complex< double > val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "fields_solve_cw", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_solve_cw" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_solve_cw" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_solve_cw" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_solve_cw" "', argument " "4"" of type '" "std::complex< double >""'");
  } 
  arg4 = static_cast< std::complex< double > >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_solve_cw" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    arg6 = (std::complex<double> *)array_data(obj5);
  }
  {
    try {
      result = (bool)(arg1)->solve_cw(arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_solve_cw__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double arg2 ;
  int arg3 ;
  std::complex< double > arg4 ;
  int arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  std::complex< double > val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "fields_solve_cw", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_solve_cw" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_solve_cw" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_solve_cw" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_solve_cw" "', argument " "4"" of type '" "std::complex< double >""'");
  } 
  arg4 = static_cast< std::complex< double > >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_solve_cw" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    try {
      result = (bool)(arg1)->solve_cw(arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_solve_cw__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double arg2 ;
  int arg3 ;
  std::complex< double > arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  std::complex< double > val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "fields_solve_cw", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_solve_cw" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_solve_cw" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_solve_cw" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_solve_cw" "', argument " "4"" of type '" "std::complex< double >""'");
  } 
  arg4 = static_cast< std::complex< double > >(val4);
  {
    try {
      result = (bool)(arg1)->solve_cw(arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_solve_cw__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double arg2 ;
  int arg3 ;
  int arg4 ;
  std::complex< double > *arg5 = (std::complex< double > *) 0 ;
  double arg6 ;
  int arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "fields_solve_cw", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_solve_cw" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_solve_cw" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_solve_cw" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_solve_cw" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    arg5 = (std::complex<double> *)array_data(obj4);
  }
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_solve_cw" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_int(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_solve_cw" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  {
    try {
      result = (bool)(arg1)->solve_cw(arg2,arg3,arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_solve_cw__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double arg2 ;
  int arg3 ;
  int arg4 ;
  std::complex< double > *arg5 = (std::complex< double > *) 0 ;
  double arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "fields_solve_cw", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_solve_cw" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_solve_cw" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_solve_cw" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_solve_cw" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    arg5 = (std::complex<double> *)array_data(obj4);
  }
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_solve_cw" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  {
    try {
      result = (bool)(arg1)->solve_cw(arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_solve_cw__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double arg2 ;
  int arg3 ;
  int arg4 ;
  std::complex< double > *arg5 = (std::complex< double > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "fields_solve_cw", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_solve_cw" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_solve_cw" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_solve_cw" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_solve_cw" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    arg5 = (std::complex<double> *)array_data(obj4);
  }
  {
    try {
      result = (bool)(arg1)->solve_cw(arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_solve_cw__SWIG_8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double arg2 ;
  int arg3 ;
  int arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "fields_solve_cw", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_solve_cw" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_solve_cw" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_solve_cw" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_solve_cw" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    try {
      result = (bool)(arg1)->solve_cw(arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_solve_cw__SWIG_9(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "fields_solve_cw", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_solve_cw" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_solve_cw" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_solve_cw" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      result = (bool)(arg1)->solve_cw(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_solve_cw__SWIG_10(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "fields_solve_cw", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_solve_cw" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_solve_cw" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = (bool)(arg1)->solve_cw(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_solve_cw__SWIG_11(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "fields_solve_cw", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_solve_cw" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      result = (bool)(arg1)->solve_cw();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_solve_cw(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[9] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 8) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_fields_solve_cw__SWIG_11(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_fields_solve_cw__SWIG_10(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_fields_solve_cw__SWIG_9(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_fields_solve_cw__SWIG_8(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_fields_solve_cw__SWIG_4(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              _v = is_array(argv[4]);
            }
            if (_v) {
              return _wrap_fields_solve_cw__SWIG_7(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_solve_cw__SWIG_3(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              _v = is_array(argv[4]);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_solve_cw__SWIG_6(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                _v = is_array(argv[5]);
              }
              if (_v) {
                return _wrap_fields_solve_cw__SWIG_2(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              _v = is_array(argv[4]);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_int(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_fields_solve_cw__SWIG_5(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                _v = is_array(argv[5]);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_double(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_fields_solve_cw__SWIG_1(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                _v = is_array(argv[5]);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_double(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_int(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    return _wrap_fields_solve_cw__SWIG_0(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_solve_cw'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::solve_cw(double,int,std::complex< double >,int,std::complex< double > *,double,int)\n"
    "    meep::fields::solve_cw(double,int,std::complex< double >,int,std::complex< double > *,double)\n"
    "    meep::fields::solve_cw(double,int,std::complex< double >,int,std::complex< double > *)\n"
    "    meep::fields::solve_cw(double,int,std::complex< double >,int)\n"
    "    meep::fields::solve_cw(double,int,std::complex< double >)\n"
    "    meep::fields::solve_cw(double,int,int,std::complex< double > *,double,int)\n"
    "    meep::fields::solve_cw(double,int,int,std::complex< double > *,double)\n"
    "    meep::fields::solve_cw(double,int,int,std::complex< double > *)\n"
    "    meep::fields::solve_cw(double,int,int)\n"
    "    meep::fields::solve_cw(double,int)\n"
    "    meep::fields::solve_cw(double)\n"
    "    meep::fields::solve_cw()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_last_source_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_last_source_time", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_last_source_time" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      result = (double)(arg1)->last_source_time();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_point_source__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  meep::vec *arg7 = 0 ;
  std::complex< double > arg8 ;
  int arg9 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  std::complex< double > val8 ;
  int ecode8 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_point_source", 9, 9, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_point_source" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_add_point_source" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_point_source" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_point_source" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_point_source" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_add_point_source" "', argument " "7"" of type '" "meep::vec const &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_point_source" "', argument " "7"" of type '" "meep::vec const &""'"); 
  }
  arg7 = reinterpret_cast< meep::vec * >(argp7);
  ecode8 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_point_source" "', argument " "8"" of type '" "std::complex< double >""'");
  } 
  arg8 = static_cast< std::complex< double > >(val8);
  ecode9 = SWIG_AsVal_int(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_add_point_source" "', argument " "9"" of type '" "int""'");
  } 
  arg9 = static_cast< int >(val9);
  {
    try {
      (arg1)->add_point_source(arg2,arg3,arg4,arg5,arg6,(meep::vec const &)*arg7,arg8,arg9);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_point_source__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  meep::vec *arg7 = 0 ;
  std::complex< double > arg8 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  std::complex< double > val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_point_source", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_point_source" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_add_point_source" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_point_source" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_point_source" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_point_source" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_add_point_source" "', argument " "7"" of type '" "meep::vec const &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_point_source" "', argument " "7"" of type '" "meep::vec const &""'"); 
  }
  arg7 = reinterpret_cast< meep::vec * >(argp7);
  ecode8 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_point_source" "', argument " "8"" of type '" "std::complex< double >""'");
  } 
  arg8 = static_cast< std::complex< double > >(val8);
  {
    try {
      (arg1)->add_point_source(arg2,arg3,arg4,arg5,arg6,(meep::vec const &)*arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_point_source__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  meep::vec *arg7 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_point_source", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_point_source" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_add_point_source" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_point_source" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_point_source" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_point_source" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_add_point_source" "', argument " "7"" of type '" "meep::vec const &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_point_source" "', argument " "7"" of type '" "meep::vec const &""'"); 
  }
  arg7 = reinterpret_cast< meep::vec * >(argp7);
  {
    try {
      (arg1)->add_point_source(arg2,arg3,arg4,arg5,arg6,(meep::vec const &)*arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_point_source__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::src_time *arg3 = 0 ;
  meep::vec *arg4 = 0 ;
  std::complex< double > arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  std::complex< double > val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_point_source", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_point_source" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    PyObject *swig_obj = NULL;
    void *tmp_ptr = 0;
    int tmp_res = 0;
    
    if(PyObject_IsInstance(obj2, py_source_time_object())) {
      swig_obj = PyObject_GetAttrString(obj2, "swigobj");
    } else if(PyObject_IsInstance(obj2, py_meep_src_time_object())) {
      swig_obj = obj2;
      Py_XINCREF(swig_obj);
    } else {
      meep::abort("Expected a meep.source.SourceTime or a meep.src_time\n");
    }
    
    tmp_res = SWIG_ConvertPtr(swig_obj, &tmp_ptr, SWIGTYPE_p_meep__src_time, 0);
    Py_XDECREF(swig_obj);
    
    if(!SWIG_IsOK(tmp_res)) {
      SWIG_exception_fail(SWIG_ArgError(tmp_res), "Couldn't convert Python object to meep::src_time");
    }
    arg3 = reinterpret_cast<meep::src_time *>(tmp_ptr);
    
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_point_source" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_point_source" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::vec * >(argp4);
  ecode5 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_point_source" "', argument " "5"" of type '" "std::complex< double >""'");
  } 
  arg5 = static_cast< std::complex< double > >(val5);
  {
    try {
      (arg1)->add_point_source(arg2,(meep::src_time const &)*arg3,(meep::vec const &)*arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_point_source__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::src_time *arg3 = 0 ;
  meep::vec *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_point_source", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_point_source" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    PyObject *swig_obj = NULL;
    void *tmp_ptr = 0;
    int tmp_res = 0;
    
    if(PyObject_IsInstance(obj2, py_source_time_object())) {
      swig_obj = PyObject_GetAttrString(obj2, "swigobj");
    } else if(PyObject_IsInstance(obj2, py_meep_src_time_object())) {
      swig_obj = obj2;
      Py_XINCREF(swig_obj);
    } else {
      meep::abort("Expected a meep.source.SourceTime or a meep.src_time\n");
    }
    
    tmp_res = SWIG_ConvertPtr(swig_obj, &tmp_ptr, SWIGTYPE_p_meep__src_time, 0);
    Py_XDECREF(swig_obj);
    
    if(!SWIG_IsOK(tmp_res)) {
      SWIG_exception_fail(SWIG_ArgError(tmp_res), "Couldn't convert Python object to meep::src_time");
    }
    arg3 = reinterpret_cast<meep::src_time *>(tmp_ptr);
    
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_point_source" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_point_source" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::vec * >(argp4);
  {
    try {
      (arg1)->add_point_source(arg2,(meep::src_time const &)*arg3,(meep::vec const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_point_source(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[10] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 9) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int py_source_time = PyObject_IsInstance(argv[2], py_source_time_object());
          int swig_src_time = PyObject_IsInstance(argv[2], py_meep_src_time_object());
          
          _v = py_source_time || swig_src_time;
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_fields_add_point_source__SWIG_4(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int py_source_time = PyObject_IsInstance(argv[2], py_source_time_object());
          int swig_src_time = PyObject_IsInstance(argv[2], py_meep_src_time_object());
          
          _v = py_source_time || swig_src_time;
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_add_point_source__SWIG_3(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                int res = SWIG_ConvertPtr(argv[6], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  return _wrap_fields_add_point_source__SWIG_2(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                int res = SWIG_ConvertPtr(argv[6], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  {
                    int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    return _wrap_fields_add_point_source__SWIG_1(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 9) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                int res = SWIG_ConvertPtr(argv[6], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  {
                    int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    {
                      int res = SWIG_AsVal_int(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      return _wrap_fields_add_point_source__SWIG_0(self, args);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_add_point_source'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::add_point_source(meep::component,double,double,double,double,meep::vec const &,std::complex< double >,int)\n"
    "    meep::fields::add_point_source(meep::component,double,double,double,double,meep::vec const &,std::complex< double >)\n"
    "    meep::fields::add_point_source(meep::component,double,double,double,double,meep::vec const &)\n"
    "    meep::fields::add_point_source(meep::component,meep::src_time const &,meep::vec const &,std::complex< double >)\n"
    "    meep::fields::add_point_source(meep::component,meep::src_time const &,meep::vec const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_add_volume_source__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::src_time *arg3 = 0 ;
  meep::volume *arg4 = 0 ;
  std::complex< double > *arg5 = (std::complex< double > *) 0 ;
  size_t arg6 ;
  size_t arg7 ;
  size_t arg8 ;
  std::complex< double > arg9 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyArrayObject *array5 = NULL ;
  std::complex< double > val9 ;
  int ecode9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_volume_source", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_volume_source" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    PyObject *swig_obj = NULL;
    void *tmp_ptr = 0;
    int tmp_res = 0;
    
    if(PyObject_IsInstance(obj2, py_source_time_object())) {
      swig_obj = PyObject_GetAttrString(obj2, "swigobj");
    } else if(PyObject_IsInstance(obj2, py_meep_src_time_object())) {
      swig_obj = obj2;
      Py_XINCREF(swig_obj);
    } else {
      meep::abort("Expected a meep.source.SourceTime or a meep.src_time\n");
    }
    
    tmp_res = SWIG_ConvertPtr(swig_obj, &tmp_ptr, SWIGTYPE_p_meep__src_time, 0);
    Py_XDECREF(swig_obj);
    
    if(!SWIG_IsOK(tmp_res)) {
      SWIG_exception_fail(SWIG_ArgError(tmp_res), "Couldn't convert Python object to meep::src_time");
    }
    arg3 = reinterpret_cast<meep::src_time *>(tmp_ptr);
    
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_volume_source" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_volume_source" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  arg4 = reinterpret_cast< meep::volume * >(argp4);
  {
    array5 = obj_to_array_no_conversion(obj4, NPY_CDOUBLE);
    if (!array5 || !require_dimensions(array5,3) || !require_contiguous(array5) ||
      !require_native(array5)) SWIG_fail;
    arg5 = (std::complex<double>*) array_data(array5);
    arg6 = (size_t) array_size(array5,0);
    arg7 = (size_t) array_size(array5,1);
    arg8 = (size_t) array_size(array5,2);
  }
  ecode9 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj5, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_add_volume_source" "', argument " "9"" of type '" "std::complex< double >""'");
  } 
  arg9 = static_cast< std::complex< double > >(val9);
  {
    try {
      (arg1)->add_volume_source(arg2,(meep::src_time const &)*arg3,(meep::volume const &)*arg4,arg5,arg6,arg7,arg8,arg9);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_volume_source__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::src_time *arg3 = 0 ;
  meep::volume *arg4 = 0 ;
  char *arg5 = (char *) 0 ;
  char *arg6 = (char *) 0 ;
  std::complex< double > arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int res5 ;
  char *buf5 = 0 ;
  int alloc5 = 0 ;
  int res6 ;
  char *buf6 = 0 ;
  int alloc6 = 0 ;
  std::complex< double > val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_volume_source", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_volume_source" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    PyObject *swig_obj = NULL;
    void *tmp_ptr = 0;
    int tmp_res = 0;
    
    if(PyObject_IsInstance(obj2, py_source_time_object())) {
      swig_obj = PyObject_GetAttrString(obj2, "swigobj");
    } else if(PyObject_IsInstance(obj2, py_meep_src_time_object())) {
      swig_obj = obj2;
      Py_XINCREF(swig_obj);
    } else {
      meep::abort("Expected a meep.source.SourceTime or a meep.src_time\n");
    }
    
    tmp_res = SWIG_ConvertPtr(swig_obj, &tmp_ptr, SWIGTYPE_p_meep__src_time, 0);
    Py_XDECREF(swig_obj);
    
    if(!SWIG_IsOK(tmp_res)) {
      SWIG_exception_fail(SWIG_ArgError(tmp_res), "Couldn't convert Python object to meep::src_time");
    }
    arg3 = reinterpret_cast<meep::src_time *>(tmp_ptr);
    
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_volume_source" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_volume_source" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  arg4 = reinterpret_cast< meep::volume * >(argp4);
  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_add_volume_source" "', argument " "5"" of type '" "char const *""'");
  }
  arg5 = reinterpret_cast< char * >(buf5);
  res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_add_volume_source" "', argument " "6"" of type '" "char const *""'");
  }
  arg6 = reinterpret_cast< char * >(buf6);
  ecode7 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_volume_source" "', argument " "7"" of type '" "std::complex< double >""'");
  } 
  arg7 = static_cast< std::complex< double > >(val7);
  {
    try {
      (arg1)->add_volume_source(arg2,(meep::src_time const &)*arg3,(meep::volume const &)*arg4,(char const *)arg5,(char const *)arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
  return resultobj;
fail:
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_volume_source__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::src_time *arg3 = 0 ;
  meep::volume *arg4 = 0 ;
  std::complex< double > (*arg5)(meep::vec const &) = (std::complex< double > (*)(meep::vec const &)) 0 ;
  std::complex< double > arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  std::complex< double > val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_volume_source", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_volume_source" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    PyObject *swig_obj = NULL;
    void *tmp_ptr = 0;
    int tmp_res = 0;
    
    if(PyObject_IsInstance(obj2, py_source_time_object())) {
      swig_obj = PyObject_GetAttrString(obj2, "swigobj");
    } else if(PyObject_IsInstance(obj2, py_meep_src_time_object())) {
      swig_obj = obj2;
      Py_XINCREF(swig_obj);
    } else {
      meep::abort("Expected a meep.source.SourceTime or a meep.src_time\n");
    }
    
    tmp_res = SWIG_ConvertPtr(swig_obj, &tmp_ptr, SWIGTYPE_p_meep__src_time, 0);
    Py_XDECREF(swig_obj);
    
    if(!SWIG_IsOK(tmp_res)) {
      SWIG_exception_fail(SWIG_ArgError(tmp_res), "Couldn't convert Python object to meep::src_time");
    }
    arg3 = reinterpret_cast<meep::src_time *>(tmp_ptr);
    
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_volume_source" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_volume_source" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  arg4 = reinterpret_cast< meep::volume * >(argp4);
  {
    if (obj4 != Py_None) {
      arg5 = py_amp_func_wrap;
      py_amp_func = obj4;
      Py_INCREF(py_amp_func);
    }
    else
    arg5 = NULL;
  }
  ecode6 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_volume_source" "', argument " "6"" of type '" "std::complex< double >""'");
  } 
  arg6 = static_cast< std::complex< double > >(val6);
  {
    try {
      (arg1)->add_volume_source(arg2,(meep::src_time const &)*arg3,(meep::volume const &)*arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    Py_XDECREF(py_amp_func);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_amp_func);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_volume_source__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::src_time *arg3 = 0 ;
  meep::volume *arg4 = 0 ;
  std::complex< double > (*arg5)(meep::vec const &) = (std::complex< double > (*)(meep::vec const &)) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_volume_source", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_volume_source" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    PyObject *swig_obj = NULL;
    void *tmp_ptr = 0;
    int tmp_res = 0;
    
    if(PyObject_IsInstance(obj2, py_source_time_object())) {
      swig_obj = PyObject_GetAttrString(obj2, "swigobj");
    } else if(PyObject_IsInstance(obj2, py_meep_src_time_object())) {
      swig_obj = obj2;
      Py_XINCREF(swig_obj);
    } else {
      meep::abort("Expected a meep.source.SourceTime or a meep.src_time\n");
    }
    
    tmp_res = SWIG_ConvertPtr(swig_obj, &tmp_ptr, SWIGTYPE_p_meep__src_time, 0);
    Py_XDECREF(swig_obj);
    
    if(!SWIG_IsOK(tmp_res)) {
      SWIG_exception_fail(SWIG_ArgError(tmp_res), "Couldn't convert Python object to meep::src_time");
    }
    arg3 = reinterpret_cast<meep::src_time *>(tmp_ptr);
    
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_volume_source" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_volume_source" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  arg4 = reinterpret_cast< meep::volume * >(argp4);
  {
    if (obj4 != Py_None) {
      arg5 = py_amp_func_wrap;
      py_amp_func = obj4;
      Py_INCREF(py_amp_func);
    }
    else
    arg5 = NULL;
  }
  {
    try {
      (arg1)->add_volume_source(arg2,(meep::src_time const &)*arg3,(meep::volume const &)*arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    Py_XDECREF(py_amp_func);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_amp_func);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_volume_source__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::src_time *arg3 = 0 ;
  meep::volume *arg4 = 0 ;
  std::complex< double > arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  std::complex< double > val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_volume_source", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_volume_source" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    PyObject *swig_obj = NULL;
    void *tmp_ptr = 0;
    int tmp_res = 0;
    
    if(PyObject_IsInstance(obj2, py_source_time_object())) {
      swig_obj = PyObject_GetAttrString(obj2, "swigobj");
    } else if(PyObject_IsInstance(obj2, py_meep_src_time_object())) {
      swig_obj = obj2;
      Py_XINCREF(swig_obj);
    } else {
      meep::abort("Expected a meep.source.SourceTime or a meep.src_time\n");
    }
    
    tmp_res = SWIG_ConvertPtr(swig_obj, &tmp_ptr, SWIGTYPE_p_meep__src_time, 0);
    Py_XDECREF(swig_obj);
    
    if(!SWIG_IsOK(tmp_res)) {
      SWIG_exception_fail(SWIG_ArgError(tmp_res), "Couldn't convert Python object to meep::src_time");
    }
    arg3 = reinterpret_cast<meep::src_time *>(tmp_ptr);
    
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_volume_source" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_volume_source" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  arg4 = reinterpret_cast< meep::volume * >(argp4);
  ecode5 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_volume_source" "', argument " "5"" of type '" "std::complex< double >""'");
  } 
  arg5 = static_cast< std::complex< double > >(val5);
  {
    try {
      (arg1)->add_volume_source(arg2,(meep::src_time const &)*arg3,(meep::volume const &)*arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_volume_source__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::src_time *arg3 = 0 ;
  meep::volume *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_volume_source", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_volume_source" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    PyObject *swig_obj = NULL;
    void *tmp_ptr = 0;
    int tmp_res = 0;
    
    if(PyObject_IsInstance(obj2, py_source_time_object())) {
      swig_obj = PyObject_GetAttrString(obj2, "swigobj");
    } else if(PyObject_IsInstance(obj2, py_meep_src_time_object())) {
      swig_obj = obj2;
      Py_XINCREF(swig_obj);
    } else {
      meep::abort("Expected a meep.source.SourceTime or a meep.src_time\n");
    }
    
    tmp_res = SWIG_ConvertPtr(swig_obj, &tmp_ptr, SWIGTYPE_p_meep__src_time, 0);
    Py_XDECREF(swig_obj);
    
    if(!SWIG_IsOK(tmp_res)) {
      SWIG_exception_fail(SWIG_ArgError(tmp_res), "Couldn't convert Python object to meep::src_time");
    }
    arg3 = reinterpret_cast<meep::src_time *>(tmp_ptr);
    
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_volume_source" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_volume_source" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  arg4 = reinterpret_cast< meep::volume * >(argp4);
  {
    try {
      (arg1)->add_volume_source(arg2,(meep::src_time const &)*arg3,(meep::volume const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_volume_source__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::src_time *arg2 = 0 ;
  meep::volume *arg3 = 0 ;
  SwigValueWrapper< meep::gaussianbeam > arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_volume_source", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_volume_source" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    PyObject *swig_obj = NULL;
    void *tmp_ptr = 0;
    int tmp_res = 0;
    
    if(PyObject_IsInstance(obj1, py_source_time_object())) {
      swig_obj = PyObject_GetAttrString(obj1, "swigobj");
    } else if(PyObject_IsInstance(obj1, py_meep_src_time_object())) {
      swig_obj = obj1;
      Py_XINCREF(swig_obj);
    } else {
      meep::abort("Expected a meep.source.SourceTime or a meep.src_time\n");
    }
    
    tmp_res = SWIG_ConvertPtr(swig_obj, &tmp_ptr, SWIGTYPE_p_meep__src_time, 0);
    Py_XDECREF(swig_obj);
    
    if(!SWIG_IsOK(tmp_res)) {
      SWIG_exception_fail(SWIG_ArgError(tmp_res), "Couldn't convert Python object to meep::src_time");
    }
    arg2 = reinterpret_cast<meep::src_time *>(tmp_ptr);
    
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_volume_source" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_volume_source" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__gaussianbeam,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_volume_source" "', argument " "4"" of type '" "meep::gaussianbeam""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_volume_source" "', argument " "4"" of type '" "meep::gaussianbeam""'");
    } else {
      meep::gaussianbeam * temp = reinterpret_cast< meep::gaussianbeam * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  {
    try {
      (arg1)->add_volume_source((meep::src_time const &)*arg2,(meep::volume const &)*arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_volume_source(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[8] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 7) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int py_source_time = PyObject_IsInstance(argv[2], py_source_time_object());
          int swig_src_time = PyObject_IsInstance(argv[2], py_meep_src_time_object());
          
          _v = py_source_time || swig_src_time;
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_fields_add_volume_source__SWIG_5(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int py_source_time = PyObject_IsInstance(argv[1], py_source_time_object());
        int swig_src_time = PyObject_IsInstance(argv[1], py_meep_src_time_object());
        
        _v = py_source_time || swig_src_time;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__gaussianbeam, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_fields_add_volume_source__SWIG_6(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int py_source_time = PyObject_IsInstance(argv[2], py_source_time_object());
          int swig_src_time = PyObject_IsInstance(argv[2], py_meep_src_time_object());
          
          _v = py_source_time || swig_src_time;
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              _v = argv[4] == Py_None || PyCallable_Check(argv[4]);
            }
            if (_v) {
              return _wrap_fields_add_volume_source__SWIG_3(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int py_source_time = PyObject_IsInstance(argv[2], py_source_time_object());
          int swig_src_time = PyObject_IsInstance(argv[2], py_meep_src_time_object());
          
          _v = py_source_time || swig_src_time;
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_add_volume_source__SWIG_4(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int py_source_time = PyObject_IsInstance(argv[2], py_source_time_object());
          int swig_src_time = PyObject_IsInstance(argv[2], py_meep_src_time_object());
          
          _v = py_source_time || swig_src_time;
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              _v = argv[4] == Py_None || PyCallable_Check(argv[4]);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_add_volume_source__SWIG_2(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int py_source_time = PyObject_IsInstance(argv[2], py_source_time_object());
          int swig_src_time = PyObject_IsInstance(argv[2], py_meep_src_time_object());
          
          _v = py_source_time || swig_src_time;
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              _v = is_array(argv[4]) && PyArray_EquivTypenums(array_type(argv[4]),
                NPY_CDOUBLE);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_add_volume_source__SWIG_0(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int py_source_time = PyObject_IsInstance(argv[2], py_source_time_object());
          int swig_src_time = PyObject_IsInstance(argv[2], py_meep_src_time_object());
          
          _v = py_source_time || swig_src_time;
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            int res = SWIG_AsCharPtrAndSize(argv[4], 0, NULL, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              int res = SWIG_AsCharPtrAndSize(argv[5], 0, NULL, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                {
                  int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_fields_add_volume_source__SWIG_1(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_add_volume_source'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::add_volume_source(meep::component,meep::src_time const &,meep::volume const &,std::complex< double > *,size_t,size_t,size_t,std::complex< double >)\n"
    "    meep::fields::add_volume_source(meep::component,meep::src_time const &,meep::volume const &,char const *,char const *,std::complex< double >)\n"
    "    meep::fields::add_volume_source(meep::component,meep::src_time const &,meep::volume const &,std::complex< double > (*)(meep::vec const &),std::complex< double >)\n"
    "    meep::fields::add_volume_source(meep::component,meep::src_time const &,meep::volume const &,std::complex< double > (*)(meep::vec const &))\n"
    "    meep::fields::add_volume_source(meep::component,meep::src_time const &,meep::volume const &,std::complex< double >)\n"
    "    meep::fields::add_volume_source(meep::component,meep::src_time const &,meep::volume const &)\n"
    "    meep::fields::add_volume_source(meep::src_time const &,meep::volume const &,meep::gaussianbeam)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_is_aniso2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "fields_is_aniso2d", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_is_aniso2d" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      result = (bool)(arg1)->is_aniso2d();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_require_source_components(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_require_source_components", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_require_source_components" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      (arg1)->require_source_components();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields__require_component(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  bool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields__require_component", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields__require_component" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields__require_component" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      (arg1)->_require_component(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_require_component(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_require_component", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_require_component" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    try {
      (arg1)->require_component(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_srcdata(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::sourcedata arg2 ;
  meep::src_time *arg3 = (meep::src_time *) 0 ;
  size_t arg4 ;
  std::complex< double > *arg5 = (std::complex< double > *) 0 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_srcdata", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_srcdata" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__sourcedata,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_srcdata" "', argument " "2"" of type '" "meep::sourcedata""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_srcdata" "', argument " "2"" of type '" "meep::sourcedata""'");
    } else {
      meep::sourcedata * temp = reinterpret_cast< meep::sourcedata * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__src_time, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_srcdata" "', argument " "3"" of type '" "meep::src_time *""'"); 
  }
  arg3 = reinterpret_cast< meep::src_time * >(argp3);
  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_srcdata" "', argument " "4"" of type '" "size_t""'");
  } 
  arg4 = static_cast< size_t >(val4);
  {
    arg5 = (std::complex<double> *)array_data(obj4);
  }
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_srcdata" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      (arg1)->add_srcdata(arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_register_src_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::src_time *arg2 = (meep::src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_register_src_time", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_register_src_time" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__src_time, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_register_src_time" "', argument " "2"" of type '" "meep::src_time *""'"); 
  }
  arg2 = reinterpret_cast< meep::src_time * >(argp2);
  {
    try {
      (arg1)->register_src_time(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_lookup_src_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_lookup_src_time", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_lookup_src_time" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_lookup_src_time" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  {
    try {
      result = (meep::src_time *)(arg1)->lookup_src_time(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__src_time, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_eigenmode__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double arg2 ;
  meep::direction arg3 ;
  SwigValueWrapper< meep::volume > arg4 ;
  SwigValueWrapper< meep::volume > arg5 ;
  int arg6 ;
  meep::vec *arg7 = 0 ;
  bool arg8 ;
  int arg9 ;
  double arg10 ;
  double arg11 ;
  double *arg12 = (double *) 0 ;
  void **arg13 = (void **) 0 ;
  meep::diffractedplanewave *arg14 = (meep::diffractedplanewave *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  void *argp5 ;
  int res5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  bool val8 ;
  int ecode8 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  double val10 ;
  int ecode10 = 0 ;
  double val11 ;
  int ecode11 = 0 ;
  void *argp12 = 0 ;
  int res12 = 0 ;
  void *argp13 = 0 ;
  int res13 = 0 ;
  void *argp14 = 0 ;
  int res14 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_eigenmode", 14, 14, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_eigenmode" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_get_eigenmode" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_get_eigenmode" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  {
    res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_get_eigenmode" "', argument " "4"" of type '" "meep::volume const""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode" "', argument " "4"" of type '" "meep::volume const""'");
    } else {
      meep::volume * temp = reinterpret_cast< meep::volume * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  {
    res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__volume,  0  | 0);
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_get_eigenmode" "', argument " "5"" of type '" "meep::volume const""'"); 
    }  
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode" "', argument " "5"" of type '" "meep::volume const""'");
    } else {
      meep::volume * temp = reinterpret_cast< meep::volume * >(argp5);
      arg5 = *temp;
      if (SWIG_IsNewObj(res5)) delete temp;
    }
  }
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_get_eigenmode" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_get_eigenmode" "', argument " "7"" of type '" "meep::vec const &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode" "', argument " "7"" of type '" "meep::vec const &""'"); 
  }
  arg7 = reinterpret_cast< meep::vec * >(argp7);
  ecode8 = SWIG_AsVal_bool(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_get_eigenmode" "', argument " "8"" of type '" "bool""'");
  } 
  arg8 = static_cast< bool >(val8);
  ecode9 = SWIG_AsVal_int(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_get_eigenmode" "', argument " "9"" of type '" "int""'");
  } 
  arg9 = static_cast< int >(val9);
  ecode10 = SWIG_AsVal_double(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_get_eigenmode" "', argument " "10"" of type '" "double""'");
  } 
  arg10 = static_cast< double >(val10);
  ecode11 = SWIG_AsVal_double(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fields_get_eigenmode" "', argument " "11"" of type '" "double""'");
  } 
  arg11 = static_cast< double >(val11);
  res12 = SWIG_ConvertPtr(obj11, &argp12,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res12)) {
    SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "fields_get_eigenmode" "', argument " "12"" of type '" "double *""'"); 
  }
  arg12 = reinterpret_cast< double * >(argp12);
  res13 = SWIG_ConvertPtr(obj12, &argp13,SWIGTYPE_p_p_void, 0 |  0 );
  if (!SWIG_IsOK(res13)) {
    SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "fields_get_eigenmode" "', argument " "13"" of type '" "void **""'"); 
  }
  arg13 = reinterpret_cast< void ** >(argp13);
  res14 = SWIG_ConvertPtr(obj13, &argp14,SWIGTYPE_p_meep__diffractedplanewave, 0 |  0 );
  if (!SWIG_IsOK(res14)) {
    SWIG_exception_fail(SWIG_ArgError(res14), "in method '" "fields_get_eigenmode" "', argument " "14"" of type '" "meep::diffractedplanewave *""'"); 
  }
  arg14 = reinterpret_cast< meep::diffractedplanewave * >(argp14);
  {
    try {
      result = (void *)(arg1)->get_eigenmode(arg2,arg3,arg4,arg5,arg6,(meep::vec const &)*arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_eigenmode__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double arg2 ;
  meep::direction arg3 ;
  SwigValueWrapper< meep::volume > arg4 ;
  SwigValueWrapper< meep::volume > arg5 ;
  int arg6 ;
  meep::vec *arg7 = 0 ;
  bool arg8 ;
  int arg9 ;
  double arg10 ;
  double arg11 ;
  double *arg12 = (double *) 0 ;
  void **arg13 = (void **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  void *argp5 ;
  int res5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  bool val8 ;
  int ecode8 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  double val10 ;
  int ecode10 = 0 ;
  double val11 ;
  int ecode11 = 0 ;
  void *argp12 = 0 ;
  int res12 = 0 ;
  void *argp13 = 0 ;
  int res13 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_eigenmode", 13, 13, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_eigenmode" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_get_eigenmode" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_get_eigenmode" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  {
    res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_get_eigenmode" "', argument " "4"" of type '" "meep::volume const""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode" "', argument " "4"" of type '" "meep::volume const""'");
    } else {
      meep::volume * temp = reinterpret_cast< meep::volume * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  {
    res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__volume,  0  | 0);
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_get_eigenmode" "', argument " "5"" of type '" "meep::volume const""'"); 
    }  
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode" "', argument " "5"" of type '" "meep::volume const""'");
    } else {
      meep::volume * temp = reinterpret_cast< meep::volume * >(argp5);
      arg5 = *temp;
      if (SWIG_IsNewObj(res5)) delete temp;
    }
  }
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_get_eigenmode" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_get_eigenmode" "', argument " "7"" of type '" "meep::vec const &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode" "', argument " "7"" of type '" "meep::vec const &""'"); 
  }
  arg7 = reinterpret_cast< meep::vec * >(argp7);
  ecode8 = SWIG_AsVal_bool(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_get_eigenmode" "', argument " "8"" of type '" "bool""'");
  } 
  arg8 = static_cast< bool >(val8);
  ecode9 = SWIG_AsVal_int(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_get_eigenmode" "', argument " "9"" of type '" "int""'");
  } 
  arg9 = static_cast< int >(val9);
  ecode10 = SWIG_AsVal_double(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_get_eigenmode" "', argument " "10"" of type '" "double""'");
  } 
  arg10 = static_cast< double >(val10);
  ecode11 = SWIG_AsVal_double(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fields_get_eigenmode" "', argument " "11"" of type '" "double""'");
  } 
  arg11 = static_cast< double >(val11);
  res12 = SWIG_ConvertPtr(obj11, &argp12,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res12)) {
    SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "fields_get_eigenmode" "', argument " "12"" of type '" "double *""'"); 
  }
  arg12 = reinterpret_cast< double * >(argp12);
  res13 = SWIG_ConvertPtr(obj12, &argp13,SWIGTYPE_p_p_void, 0 |  0 );
  if (!SWIG_IsOK(res13)) {
    SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "fields_get_eigenmode" "', argument " "13"" of type '" "void **""'"); 
  }
  arg13 = reinterpret_cast< void ** >(argp13);
  {
    try {
      result = (void *)(arg1)->get_eigenmode(arg2,arg3,arg4,arg5,arg6,(meep::vec const &)*arg7,arg8,arg9,arg10,arg11,arg12,arg13);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_eigenmode__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double arg2 ;
  meep::direction arg3 ;
  SwigValueWrapper< meep::volume > arg4 ;
  SwigValueWrapper< meep::volume > arg5 ;
  int arg6 ;
  meep::vec *arg7 = 0 ;
  bool arg8 ;
  int arg9 ;
  double arg10 ;
  double arg11 ;
  double *arg12 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  void *argp5 ;
  int res5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  bool val8 ;
  int ecode8 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  double val10 ;
  int ecode10 = 0 ;
  double val11 ;
  int ecode11 = 0 ;
  void *argp12 = 0 ;
  int res12 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_eigenmode", 12, 12, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_eigenmode" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_get_eigenmode" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_get_eigenmode" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  {
    res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_get_eigenmode" "', argument " "4"" of type '" "meep::volume const""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode" "', argument " "4"" of type '" "meep::volume const""'");
    } else {
      meep::volume * temp = reinterpret_cast< meep::volume * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  {
    res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__volume,  0  | 0);
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_get_eigenmode" "', argument " "5"" of type '" "meep::volume const""'"); 
    }  
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode" "', argument " "5"" of type '" "meep::volume const""'");
    } else {
      meep::volume * temp = reinterpret_cast< meep::volume * >(argp5);
      arg5 = *temp;
      if (SWIG_IsNewObj(res5)) delete temp;
    }
  }
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_get_eigenmode" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_get_eigenmode" "', argument " "7"" of type '" "meep::vec const &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode" "', argument " "7"" of type '" "meep::vec const &""'"); 
  }
  arg7 = reinterpret_cast< meep::vec * >(argp7);
  ecode8 = SWIG_AsVal_bool(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_get_eigenmode" "', argument " "8"" of type '" "bool""'");
  } 
  arg8 = static_cast< bool >(val8);
  ecode9 = SWIG_AsVal_int(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_get_eigenmode" "', argument " "9"" of type '" "int""'");
  } 
  arg9 = static_cast< int >(val9);
  ecode10 = SWIG_AsVal_double(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_get_eigenmode" "', argument " "10"" of type '" "double""'");
  } 
  arg10 = static_cast< double >(val10);
  ecode11 = SWIG_AsVal_double(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fields_get_eigenmode" "', argument " "11"" of type '" "double""'");
  } 
  arg11 = static_cast< double >(val11);
  res12 = SWIG_ConvertPtr(obj11, &argp12,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res12)) {
    SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "fields_get_eigenmode" "', argument " "12"" of type '" "double *""'"); 
  }
  arg12 = reinterpret_cast< double * >(argp12);
  {
    try {
      result = (void *)(arg1)->get_eigenmode(arg2,arg3,arg4,arg5,arg6,(meep::vec const &)*arg7,arg8,arg9,arg10,arg11,arg12);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_eigenmode__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double arg2 ;
  meep::direction arg3 ;
  SwigValueWrapper< meep::volume > arg4 ;
  SwigValueWrapper< meep::volume > arg5 ;
  int arg6 ;
  meep::vec *arg7 = 0 ;
  bool arg8 ;
  int arg9 ;
  double arg10 ;
  double arg11 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  void *argp5 ;
  int res5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  bool val8 ;
  int ecode8 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  double val10 ;
  int ecode10 = 0 ;
  double val11 ;
  int ecode11 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_eigenmode", 11, 11, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_eigenmode" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_get_eigenmode" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_get_eigenmode" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  {
    res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_get_eigenmode" "', argument " "4"" of type '" "meep::volume const""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode" "', argument " "4"" of type '" "meep::volume const""'");
    } else {
      meep::volume * temp = reinterpret_cast< meep::volume * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  {
    res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__volume,  0  | 0);
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_get_eigenmode" "', argument " "5"" of type '" "meep::volume const""'"); 
    }  
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode" "', argument " "5"" of type '" "meep::volume const""'");
    } else {
      meep::volume * temp = reinterpret_cast< meep::volume * >(argp5);
      arg5 = *temp;
      if (SWIG_IsNewObj(res5)) delete temp;
    }
  }
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_get_eigenmode" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_get_eigenmode" "', argument " "7"" of type '" "meep::vec const &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode" "', argument " "7"" of type '" "meep::vec const &""'"); 
  }
  arg7 = reinterpret_cast< meep::vec * >(argp7);
  ecode8 = SWIG_AsVal_bool(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_get_eigenmode" "', argument " "8"" of type '" "bool""'");
  } 
  arg8 = static_cast< bool >(val8);
  ecode9 = SWIG_AsVal_int(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_get_eigenmode" "', argument " "9"" of type '" "int""'");
  } 
  arg9 = static_cast< int >(val9);
  ecode10 = SWIG_AsVal_double(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_get_eigenmode" "', argument " "10"" of type '" "double""'");
  } 
  arg10 = static_cast< double >(val10);
  ecode11 = SWIG_AsVal_double(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fields_get_eigenmode" "', argument " "11"" of type '" "double""'");
  } 
  arg11 = static_cast< double >(val11);
  {
    try {
      result = (void *)(arg1)->get_eigenmode(arg2,arg3,arg4,arg5,arg6,(meep::vec const &)*arg7,arg8,arg9,arg10,arg11);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_eigenmode(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[15] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 14) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 11) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            int res = SWIG_ConvertPtr(argv[4], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                int res = SWIG_ConvertPtr(argv[6], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  {
                    int res = SWIG_AsVal_bool(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    {
                      int res = SWIG_AsVal_int(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        int res = SWIG_AsVal_double(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        {
                          int res = SWIG_AsVal_double(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          return _wrap_fields_get_eigenmode__SWIG_3(self, args);
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 12) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            int res = SWIG_ConvertPtr(argv[4], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                int res = SWIG_ConvertPtr(argv[6], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  {
                    int res = SWIG_AsVal_bool(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    {
                      int res = SWIG_AsVal_int(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        int res = SWIG_AsVal_double(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        {
                          int res = SWIG_AsVal_double(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          void *vptr = 0;
                          int res = SWIG_ConvertPtr(argv[11], &vptr, SWIGTYPE_p_double, 0);
                          _v = SWIG_CheckState(res);
                          if (_v) {
                            return _wrap_fields_get_eigenmode__SWIG_2(self, args);
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 13) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            int res = SWIG_ConvertPtr(argv[4], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                int res = SWIG_ConvertPtr(argv[6], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  {
                    int res = SWIG_AsVal_bool(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    {
                      int res = SWIG_AsVal_int(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        int res = SWIG_AsVal_double(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        {
                          int res = SWIG_AsVal_double(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          void *vptr = 0;
                          int res = SWIG_ConvertPtr(argv[11], &vptr, SWIGTYPE_p_double, 0);
                          _v = SWIG_CheckState(res);
                          if (_v) {
                            void *vptr = 0;
                            int res = SWIG_ConvertPtr(argv[12], &vptr, SWIGTYPE_p_p_void, 0);
                            _v = SWIG_CheckState(res);
                            if (_v) {
                              return _wrap_fields_get_eigenmode__SWIG_1(self, args);
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 14) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            int res = SWIG_ConvertPtr(argv[4], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                int res = SWIG_ConvertPtr(argv[6], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  {
                    int res = SWIG_AsVal_bool(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    {
                      int res = SWIG_AsVal_int(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        int res = SWIG_AsVal_double(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        {
                          int res = SWIG_AsVal_double(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          void *vptr = 0;
                          int res = SWIG_ConvertPtr(argv[11], &vptr, SWIGTYPE_p_double, 0);
                          _v = SWIG_CheckState(res);
                          if (_v) {
                            void *vptr = 0;
                            int res = SWIG_ConvertPtr(argv[12], &vptr, SWIGTYPE_p_p_void, 0);
                            _v = SWIG_CheckState(res);
                            if (_v) {
                              void *vptr = 0;
                              int res = SWIG_ConvertPtr(argv[13], &vptr, SWIGTYPE_p_meep__diffractedplanewave, 0);
                              _v = SWIG_CheckState(res);
                              if (_v) {
                                return _wrap_fields_get_eigenmode__SWIG_0(self, args);
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_get_eigenmode'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::get_eigenmode(double,meep::direction,meep::volume const,meep::volume const,int,meep::vec const &,bool,int,double,double,double *,void **,meep::diffractedplanewave *)\n"
    "    meep::fields::get_eigenmode(double,meep::direction,meep::volume const,meep::volume const,int,meep::vec const &,bool,int,double,double,double *,void **)\n"
    "    meep::fields::get_eigenmode(double,meep::direction,meep::volume const,meep::volume const,int,meep::vec const &,bool,int,double,double,double *)\n"
    "    meep::fields::get_eigenmode(double,meep::direction,meep::volume const,meep::volume const,int,meep::vec const &,bool,int,double,double)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_add_eigenmode_source__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::src_time *arg3 = 0 ;
  meep::direction arg4 ;
  meep::volume *arg5 = 0 ;
  meep::volume *arg6 = 0 ;
  int arg7 ;
  meep::vec *arg8 = 0 ;
  bool arg9 ;
  int arg10 ;
  double arg11 ;
  double arg12 ;
  std::complex< double > arg13 ;
  std::complex< double > (*arg14)(meep::vec const &) = (std::complex< double > (*)(meep::vec const &)) 0 ;
  meep::diffractedplanewave *arg15 = (meep::diffractedplanewave *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  bool val9 ;
  int ecode9 = 0 ;
  int val10 ;
  int ecode10 = 0 ;
  double val11 ;
  int ecode11 = 0 ;
  double val12 ;
  int ecode12 = 0 ;
  std::complex< double > val13 ;
  int ecode13 = 0 ;
  void *argp15 = 0 ;
  int res15 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  PyObject * obj14 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_eigenmode_source", 15, 15, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13, &obj14)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_eigenmode_source" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    PyObject *swig_obj = NULL;
    void *tmp_ptr = 0;
    int tmp_res = 0;
    
    if(PyObject_IsInstance(obj2, py_source_time_object())) {
      swig_obj = PyObject_GetAttrString(obj2, "swigobj");
    } else if(PyObject_IsInstance(obj2, py_meep_src_time_object())) {
      swig_obj = obj2;
      Py_XINCREF(swig_obj);
    } else {
      meep::abort("Expected a meep.source.SourceTime or a meep.src_time\n");
    }
    
    tmp_res = SWIG_ConvertPtr(swig_obj, &tmp_ptr, SWIGTYPE_p_meep__src_time, 0);
    Py_XDECREF(swig_obj);
    
    if(!SWIG_IsOK(tmp_res)) {
      SWIG_exception_fail(SWIG_ArgError(tmp_res), "Couldn't convert Python object to meep::src_time");
    }
    arg3 = reinterpret_cast<meep::src_time *>(tmp_ptr);
    
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_eigenmode_source" "', argument " "4"" of type '" "meep::direction""'");
  } 
  arg4 = static_cast< meep::direction >(val4);
  res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_add_eigenmode_source" "', argument " "5"" of type '" "meep::volume const &""'"); 
  }
  if (!argp5) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_eigenmode_source" "', argument " "5"" of type '" "meep::volume const &""'"); 
  }
  arg5 = reinterpret_cast< meep::volume * >(argp5);
  res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_add_eigenmode_source" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  if (!argp6) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_eigenmode_source" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  arg6 = reinterpret_cast< meep::volume * >(argp6);
  ecode7 = SWIG_AsVal_int(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_eigenmode_source" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  res8 = SWIG_ConvertPtr(obj7, &argp8, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_add_eigenmode_source" "', argument " "8"" of type '" "meep::vec const &""'"); 
  }
  if (!argp8) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_eigenmode_source" "', argument " "8"" of type '" "meep::vec const &""'"); 
  }
  arg8 = reinterpret_cast< meep::vec * >(argp8);
  ecode9 = SWIG_AsVal_bool(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_add_eigenmode_source" "', argument " "9"" of type '" "bool""'");
  } 
  arg9 = static_cast< bool >(val9);
  ecode10 = SWIG_AsVal_int(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_add_eigenmode_source" "', argument " "10"" of type '" "int""'");
  } 
  arg10 = static_cast< int >(val10);
  ecode11 = SWIG_AsVal_double(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fields_add_eigenmode_source" "', argument " "11"" of type '" "double""'");
  } 
  arg11 = static_cast< double >(val11);
  ecode12 = SWIG_AsVal_double(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "fields_add_eigenmode_source" "', argument " "12"" of type '" "double""'");
  } 
  arg12 = static_cast< double >(val12);
  ecode13 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj12, &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "fields_add_eigenmode_source" "', argument " "13"" of type '" "std::complex< double >""'");
  } 
  arg13 = static_cast< std::complex< double > >(val13);
  {
    if (obj13 != Py_None) {
      arg14 = py_amp_func_wrap;
      py_amp_func = obj13;
      Py_INCREF(py_amp_func);
    }
    else
    arg14 = NULL;
  }
  res15 = SWIG_ConvertPtr(obj14, &argp15,SWIGTYPE_p_meep__diffractedplanewave, 0 |  0 );
  if (!SWIG_IsOK(res15)) {
    SWIG_exception_fail(SWIG_ArgError(res15), "in method '" "fields_add_eigenmode_source" "', argument " "15"" of type '" "meep::diffractedplanewave *""'"); 
  }
  arg15 = reinterpret_cast< meep::diffractedplanewave * >(argp15);
  {
    try {
      (arg1)->add_eigenmode_source(arg2,(meep::src_time const &)*arg3,arg4,(meep::volume const &)*arg5,(meep::volume const &)*arg6,arg7,(meep::vec const &)*arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    Py_XDECREF(py_amp_func);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_amp_func);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_eigenmode_source__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::src_time *arg3 = 0 ;
  meep::direction arg4 ;
  meep::volume *arg5 = 0 ;
  meep::volume *arg6 = 0 ;
  int arg7 ;
  meep::vec *arg8 = 0 ;
  bool arg9 ;
  int arg10 ;
  double arg11 ;
  double arg12 ;
  std::complex< double > arg13 ;
  std::complex< double > (*arg14)(meep::vec const &) = (std::complex< double > (*)(meep::vec const &)) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  bool val9 ;
  int ecode9 = 0 ;
  int val10 ;
  int ecode10 = 0 ;
  double val11 ;
  int ecode11 = 0 ;
  double val12 ;
  int ecode12 = 0 ;
  std::complex< double > val13 ;
  int ecode13 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_eigenmode_source", 14, 14, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_eigenmode_source" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    PyObject *swig_obj = NULL;
    void *tmp_ptr = 0;
    int tmp_res = 0;
    
    if(PyObject_IsInstance(obj2, py_source_time_object())) {
      swig_obj = PyObject_GetAttrString(obj2, "swigobj");
    } else if(PyObject_IsInstance(obj2, py_meep_src_time_object())) {
      swig_obj = obj2;
      Py_XINCREF(swig_obj);
    } else {
      meep::abort("Expected a meep.source.SourceTime or a meep.src_time\n");
    }
    
    tmp_res = SWIG_ConvertPtr(swig_obj, &tmp_ptr, SWIGTYPE_p_meep__src_time, 0);
    Py_XDECREF(swig_obj);
    
    if(!SWIG_IsOK(tmp_res)) {
      SWIG_exception_fail(SWIG_ArgError(tmp_res), "Couldn't convert Python object to meep::src_time");
    }
    arg3 = reinterpret_cast<meep::src_time *>(tmp_ptr);
    
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_eigenmode_source" "', argument " "4"" of type '" "meep::direction""'");
  } 
  arg4 = static_cast< meep::direction >(val4);
  res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_add_eigenmode_source" "', argument " "5"" of type '" "meep::volume const &""'"); 
  }
  if (!argp5) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_eigenmode_source" "', argument " "5"" of type '" "meep::volume const &""'"); 
  }
  arg5 = reinterpret_cast< meep::volume * >(argp5);
  res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_add_eigenmode_source" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  if (!argp6) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_eigenmode_source" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  arg6 = reinterpret_cast< meep::volume * >(argp6);
  ecode7 = SWIG_AsVal_int(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_eigenmode_source" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  res8 = SWIG_ConvertPtr(obj7, &argp8, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_add_eigenmode_source" "', argument " "8"" of type '" "meep::vec const &""'"); 
  }
  if (!argp8) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_eigenmode_source" "', argument " "8"" of type '" "meep::vec const &""'"); 
  }
  arg8 = reinterpret_cast< meep::vec * >(argp8);
  ecode9 = SWIG_AsVal_bool(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_add_eigenmode_source" "', argument " "9"" of type '" "bool""'");
  } 
  arg9 = static_cast< bool >(val9);
  ecode10 = SWIG_AsVal_int(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_add_eigenmode_source" "', argument " "10"" of type '" "int""'");
  } 
  arg10 = static_cast< int >(val10);
  ecode11 = SWIG_AsVal_double(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fields_add_eigenmode_source" "', argument " "11"" of type '" "double""'");
  } 
  arg11 = static_cast< double >(val11);
  ecode12 = SWIG_AsVal_double(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "fields_add_eigenmode_source" "', argument " "12"" of type '" "double""'");
  } 
  arg12 = static_cast< double >(val12);
  ecode13 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj12, &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "fields_add_eigenmode_source" "', argument " "13"" of type '" "std::complex< double >""'");
  } 
  arg13 = static_cast< std::complex< double > >(val13);
  {
    if (obj13 != Py_None) {
      arg14 = py_amp_func_wrap;
      py_amp_func = obj13;
      Py_INCREF(py_amp_func);
    }
    else
    arg14 = NULL;
  }
  {
    try {
      (arg1)->add_eigenmode_source(arg2,(meep::src_time const &)*arg3,arg4,(meep::volume const &)*arg5,(meep::volume const &)*arg6,arg7,(meep::vec const &)*arg8,arg9,arg10,arg11,arg12,arg13,arg14);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    Py_XDECREF(py_amp_func);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_amp_func);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_eigenmode_source__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::src_time *arg3 = 0 ;
  meep::direction arg4 ;
  meep::volume *arg5 = 0 ;
  meep::volume *arg6 = 0 ;
  int arg7 ;
  meep::vec *arg8 = 0 ;
  bool arg9 ;
  int arg10 ;
  double arg11 ;
  double arg12 ;
  std::complex< double > arg13 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  bool val9 ;
  int ecode9 = 0 ;
  int val10 ;
  int ecode10 = 0 ;
  double val11 ;
  int ecode11 = 0 ;
  double val12 ;
  int ecode12 = 0 ;
  std::complex< double > val13 ;
  int ecode13 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_eigenmode_source", 13, 13, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_eigenmode_source" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    PyObject *swig_obj = NULL;
    void *tmp_ptr = 0;
    int tmp_res = 0;
    
    if(PyObject_IsInstance(obj2, py_source_time_object())) {
      swig_obj = PyObject_GetAttrString(obj2, "swigobj");
    } else if(PyObject_IsInstance(obj2, py_meep_src_time_object())) {
      swig_obj = obj2;
      Py_XINCREF(swig_obj);
    } else {
      meep::abort("Expected a meep.source.SourceTime or a meep.src_time\n");
    }
    
    tmp_res = SWIG_ConvertPtr(swig_obj, &tmp_ptr, SWIGTYPE_p_meep__src_time, 0);
    Py_XDECREF(swig_obj);
    
    if(!SWIG_IsOK(tmp_res)) {
      SWIG_exception_fail(SWIG_ArgError(tmp_res), "Couldn't convert Python object to meep::src_time");
    }
    arg3 = reinterpret_cast<meep::src_time *>(tmp_ptr);
    
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_eigenmode_source" "', argument " "4"" of type '" "meep::direction""'");
  } 
  arg4 = static_cast< meep::direction >(val4);
  res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_add_eigenmode_source" "', argument " "5"" of type '" "meep::volume const &""'"); 
  }
  if (!argp5) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_eigenmode_source" "', argument " "5"" of type '" "meep::volume const &""'"); 
  }
  arg5 = reinterpret_cast< meep::volume * >(argp5);
  res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_add_eigenmode_source" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  if (!argp6) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_eigenmode_source" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  arg6 = reinterpret_cast< meep::volume * >(argp6);
  ecode7 = SWIG_AsVal_int(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_eigenmode_source" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  res8 = SWIG_ConvertPtr(obj7, &argp8, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_add_eigenmode_source" "', argument " "8"" of type '" "meep::vec const &""'"); 
  }
  if (!argp8) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_eigenmode_source" "', argument " "8"" of type '" "meep::vec const &""'"); 
  }
  arg8 = reinterpret_cast< meep::vec * >(argp8);
  ecode9 = SWIG_AsVal_bool(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_add_eigenmode_source" "', argument " "9"" of type '" "bool""'");
  } 
  arg9 = static_cast< bool >(val9);
  ecode10 = SWIG_AsVal_int(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_add_eigenmode_source" "', argument " "10"" of type '" "int""'");
  } 
  arg10 = static_cast< int >(val10);
  ecode11 = SWIG_AsVal_double(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fields_add_eigenmode_source" "', argument " "11"" of type '" "double""'");
  } 
  arg11 = static_cast< double >(val11);
  ecode12 = SWIG_AsVal_double(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "fields_add_eigenmode_source" "', argument " "12"" of type '" "double""'");
  } 
  arg12 = static_cast< double >(val12);
  ecode13 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj12, &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "fields_add_eigenmode_source" "', argument " "13"" of type '" "std::complex< double >""'");
  } 
  arg13 = static_cast< std::complex< double > >(val13);
  {
    try {
      (arg1)->add_eigenmode_source(arg2,(meep::src_time const &)*arg3,arg4,(meep::volume const &)*arg5,(meep::volume const &)*arg6,arg7,(meep::vec const &)*arg8,arg9,arg10,arg11,arg12,arg13);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_eigenmode_source(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[16] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 15) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 13) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int py_source_time = PyObject_IsInstance(argv[2], py_source_time_object());
          int swig_src_time = PyObject_IsInstance(argv[2], py_meep_src_time_object());
          
          _v = py_source_time || swig_src_time;
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            int res = SWIG_ConvertPtr(argv[4], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              int res = SWIG_ConvertPtr(argv[5], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                {
                  int res = SWIG_AsVal_int(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  int res = SWIG_ConvertPtr(argv[7], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    {
                      int res = SWIG_AsVal_bool(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        int res = SWIG_AsVal_int(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        {
                          int res = SWIG_AsVal_double(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          {
                            int res = SWIG_AsVal_double(argv[11], NULL);
                            _v = SWIG_CheckState(res);
                          }
                          if (_v) {
                            {
                              int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[12], NULL);
                              _v = SWIG_CheckState(res);
                            }
                            if (_v) {
                              return _wrap_fields_add_eigenmode_source__SWIG_2(self, args);
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 14) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int py_source_time = PyObject_IsInstance(argv[2], py_source_time_object());
          int swig_src_time = PyObject_IsInstance(argv[2], py_meep_src_time_object());
          
          _v = py_source_time || swig_src_time;
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            int res = SWIG_ConvertPtr(argv[4], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              int res = SWIG_ConvertPtr(argv[5], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                {
                  int res = SWIG_AsVal_int(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  int res = SWIG_ConvertPtr(argv[7], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    {
                      int res = SWIG_AsVal_bool(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        int res = SWIG_AsVal_int(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        {
                          int res = SWIG_AsVal_double(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          {
                            int res = SWIG_AsVal_double(argv[11], NULL);
                            _v = SWIG_CheckState(res);
                          }
                          if (_v) {
                            {
                              int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[12], NULL);
                              _v = SWIG_CheckState(res);
                            }
                            if (_v) {
                              {
                                _v = argv[13] == Py_None || PyCallable_Check(argv[13]);
                              }
                              if (_v) {
                                return _wrap_fields_add_eigenmode_source__SWIG_1(self, args);
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 15) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int py_source_time = PyObject_IsInstance(argv[2], py_source_time_object());
          int swig_src_time = PyObject_IsInstance(argv[2], py_meep_src_time_object());
          
          _v = py_source_time || swig_src_time;
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            int res = SWIG_ConvertPtr(argv[4], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              int res = SWIG_ConvertPtr(argv[5], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                {
                  int res = SWIG_AsVal_int(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  int res = SWIG_ConvertPtr(argv[7], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    {
                      int res = SWIG_AsVal_bool(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        int res = SWIG_AsVal_int(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        {
                          int res = SWIG_AsVal_double(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          {
                            int res = SWIG_AsVal_double(argv[11], NULL);
                            _v = SWIG_CheckState(res);
                          }
                          if (_v) {
                            {
                              int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[12], NULL);
                              _v = SWIG_CheckState(res);
                            }
                            if (_v) {
                              {
                                _v = argv[13] == Py_None || PyCallable_Check(argv[13]);
                              }
                              if (_v) {
                                void *vptr = 0;
                                int res = SWIG_ConvertPtr(argv[14], &vptr, SWIGTYPE_p_meep__diffractedplanewave, 0);
                                _v = SWIG_CheckState(res);
                                if (_v) {
                                  return _wrap_fields_add_eigenmode_source__SWIG_0(self, args);
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_add_eigenmode_source'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::add_eigenmode_source(meep::component,meep::src_time const &,meep::direction,meep::volume const &,meep::volume const &,int,meep::vec const &,bool,int,double,double,std::complex< double >,std::complex< double > (*)(meep::vec const &),meep::diffractedplanewave *)\n"
    "    meep::fields::add_eigenmode_source(meep::component,meep::src_time const &,meep::direction,meep::volume const &,meep::volume const &,int,meep::vec const &,bool,int,double,double,std::complex< double >,std::complex< double > (*)(meep::vec const &))\n"
    "    meep::fields::add_eigenmode_source(meep::component,meep::src_time const &,meep::direction,meep::volume const &,meep::volume const &,int,meep::vec const &,bool,int,double,double,std::complex< double >)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_get_eigenmode_coefficients__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  SwigValueWrapper< meep::dft_flux > arg2 ;
  meep::volume *arg3 = 0 ;
  int *arg4 = (int *) 0 ;
  int arg5 ;
  int arg6 ;
  double arg7 ;
  double arg8 ;
  std::complex< double > *arg9 = (std::complex< double > *) 0 ;
  double *arg10 = (double *) 0 ;
  meep::kpoint_func arg11 = (meep::kpoint_func) 0 ;
  void *arg12 = (void *) 0 ;
  meep::vec *arg13 = (meep::vec *) 0 ;
  meep::vec *arg14 = (meep::vec *) 0 ;
  double *arg15 = (double *) 0 ;
  meep::direction arg16 ;
  meep::diffractedplanewave *arg17 = (meep::diffractedplanewave *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyArrayObject *array4 = NULL ;
  int is_new_object4 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  void *argp13 = 0 ;
  int res13 = 0 ;
  void *argp14 = 0 ;
  int res14 = 0 ;
  int val16 ;
  int ecode16 = 0 ;
  void *argp17 = 0 ;
  int res17 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  PyObject * obj14 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_eigenmode_coefficients", 15, 15, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13, &obj14)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_eigenmode_coefficients" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_flux,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_eigenmode_coefficients" "', argument " "2"" of type '" "meep::dft_flux""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode_coefficients" "', argument " "2"" of type '" "meep::dft_flux""'");
    } else {
      meep::dft_flux * temp = reinterpret_cast< meep::dft_flux * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_eigenmode_coefficients" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode_coefficients" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    npy_intp size[1] = {
      -1 
    };
    array4 = obj_to_array_contiguous_allow_conversion(obj3,
      NPY_INT,
      &is_new_object4);
    if (!array4 || !require_dimensions(array4, 1) ||
      !require_size(array4, size, 1)) SWIG_fail;
    arg4 = (int*) array_data(array4);
    arg5 = (int) array_size(array4,0);
  }
  ecode6 = SWIG_AsVal_int(obj4, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_get_eigenmode_coefficients" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_double(obj5, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_get_eigenmode_coefficients" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  ecode8 = SWIG_AsVal_double(obj6, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_get_eigenmode_coefficients" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  {
    arg9 = (std::complex<double> *)array_data(obj7);
  }
  {
    arg10 = (double *)array_data(obj8);
  }
  {
    if (obj9 == Py_None) {
      arg11 = NULL;
      arg12 = NULL;
    }
    else {
      arg11 = py_kpoint_func_wrap;
      arg12 = (void*)obj9;
    }
  }
  res13 = SWIG_ConvertPtr(obj10, &argp13,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res13)) {
    SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "fields_get_eigenmode_coefficients" "', argument " "13"" of type '" "meep::vec *""'"); 
  }
  arg13 = reinterpret_cast< meep::vec * >(argp13);
  res14 = SWIG_ConvertPtr(obj11, &argp14,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res14)) {
    SWIG_exception_fail(SWIG_ArgError(res14), "in method '" "fields_get_eigenmode_coefficients" "', argument " "14"" of type '" "meep::vec *""'"); 
  }
  arg14 = reinterpret_cast< meep::vec * >(argp14);
  {
    arg15 = (double *)array_data(obj12);
  }
  ecode16 = SWIG_AsVal_int(obj13, &val16);
  if (!SWIG_IsOK(ecode16)) {
    SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "fields_get_eigenmode_coefficients" "', argument " "16"" of type '" "meep::direction""'");
  } 
  arg16 = static_cast< meep::direction >(val16);
  res17 = SWIG_ConvertPtr(obj14, &argp17,SWIGTYPE_p_meep__diffractedplanewave, 0 |  0 );
  if (!SWIG_IsOK(res17)) {
    SWIG_exception_fail(SWIG_ArgError(res17), "in method '" "fields_get_eigenmode_coefficients" "', argument " "17"" of type '" "meep::diffractedplanewave *""'"); 
  }
  arg17 = reinterpret_cast< meep::diffractedplanewave * >(argp17);
  {
    try {
      (arg1)->get_eigenmode_coefficients(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    if (is_new_object4 && array4)
    {
      Py_DECREF(array4); 
    }
  }
  return resultobj;
fail:
  {
    if (is_new_object4 && array4)
    {
      Py_DECREF(array4); 
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_eigenmode_coefficients__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  SwigValueWrapper< meep::dft_flux > arg2 ;
  meep::volume *arg3 = 0 ;
  int *arg4 = (int *) 0 ;
  int arg5 ;
  int arg6 ;
  double arg7 ;
  double arg8 ;
  std::complex< double > *arg9 = (std::complex< double > *) 0 ;
  double *arg10 = (double *) 0 ;
  meep::kpoint_func arg11 = (meep::kpoint_func) 0 ;
  void *arg12 = (void *) 0 ;
  meep::vec *arg13 = (meep::vec *) 0 ;
  meep::vec *arg14 = (meep::vec *) 0 ;
  double *arg15 = (double *) 0 ;
  meep::direction arg16 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyArrayObject *array4 = NULL ;
  int is_new_object4 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  void *argp13 = 0 ;
  int res13 = 0 ;
  void *argp14 = 0 ;
  int res14 = 0 ;
  int val16 ;
  int ecode16 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_eigenmode_coefficients", 14, 14, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_eigenmode_coefficients" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_flux,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_eigenmode_coefficients" "', argument " "2"" of type '" "meep::dft_flux""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode_coefficients" "', argument " "2"" of type '" "meep::dft_flux""'");
    } else {
      meep::dft_flux * temp = reinterpret_cast< meep::dft_flux * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_eigenmode_coefficients" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode_coefficients" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    npy_intp size[1] = {
      -1 
    };
    array4 = obj_to_array_contiguous_allow_conversion(obj3,
      NPY_INT,
      &is_new_object4);
    if (!array4 || !require_dimensions(array4, 1) ||
      !require_size(array4, size, 1)) SWIG_fail;
    arg4 = (int*) array_data(array4);
    arg5 = (int) array_size(array4,0);
  }
  ecode6 = SWIG_AsVal_int(obj4, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_get_eigenmode_coefficients" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_double(obj5, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_get_eigenmode_coefficients" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  ecode8 = SWIG_AsVal_double(obj6, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_get_eigenmode_coefficients" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  {
    arg9 = (std::complex<double> *)array_data(obj7);
  }
  {
    arg10 = (double *)array_data(obj8);
  }
  {
    if (obj9 == Py_None) {
      arg11 = NULL;
      arg12 = NULL;
    }
    else {
      arg11 = py_kpoint_func_wrap;
      arg12 = (void*)obj9;
    }
  }
  res13 = SWIG_ConvertPtr(obj10, &argp13,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res13)) {
    SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "fields_get_eigenmode_coefficients" "', argument " "13"" of type '" "meep::vec *""'"); 
  }
  arg13 = reinterpret_cast< meep::vec * >(argp13);
  res14 = SWIG_ConvertPtr(obj11, &argp14,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res14)) {
    SWIG_exception_fail(SWIG_ArgError(res14), "in method '" "fields_get_eigenmode_coefficients" "', argument " "14"" of type '" "meep::vec *""'"); 
  }
  arg14 = reinterpret_cast< meep::vec * >(argp14);
  {
    arg15 = (double *)array_data(obj12);
  }
  ecode16 = SWIG_AsVal_int(obj13, &val16);
  if (!SWIG_IsOK(ecode16)) {
    SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "fields_get_eigenmode_coefficients" "', argument " "16"" of type '" "meep::direction""'");
  } 
  arg16 = static_cast< meep::direction >(val16);
  {
    try {
      (arg1)->get_eigenmode_coefficients(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    if (is_new_object4 && array4)
    {
      Py_DECREF(array4); 
    }
  }
  return resultobj;
fail:
  {
    if (is_new_object4 && array4)
    {
      Py_DECREF(array4); 
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_eigenmode_coefficients__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  SwigValueWrapper< meep::dft_flux > arg2 ;
  meep::volume *arg3 = 0 ;
  int *arg4 = (int *) 0 ;
  int arg5 ;
  int arg6 ;
  double arg7 ;
  double arg8 ;
  std::complex< double > *arg9 = (std::complex< double > *) 0 ;
  double *arg10 = (double *) 0 ;
  meep::kpoint_func arg11 = (meep::kpoint_func) 0 ;
  void *arg12 = (void *) 0 ;
  meep::vec *arg13 = (meep::vec *) 0 ;
  meep::vec *arg14 = (meep::vec *) 0 ;
  double *arg15 = (double *) 0 ;
  meep::diffractedplanewave *arg16 = (meep::diffractedplanewave *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyArrayObject *array4 = NULL ;
  int is_new_object4 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  void *argp13 = 0 ;
  int res13 = 0 ;
  void *argp14 = 0 ;
  int res14 = 0 ;
  void *argp16 = 0 ;
  int res16 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_eigenmode_coefficients", 14, 14, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_eigenmode_coefficients" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_flux,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_eigenmode_coefficients" "', argument " "2"" of type '" "meep::dft_flux""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode_coefficients" "', argument " "2"" of type '" "meep::dft_flux""'");
    } else {
      meep::dft_flux * temp = reinterpret_cast< meep::dft_flux * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_eigenmode_coefficients" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode_coefficients" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    npy_intp size[1] = {
      -1 
    };
    array4 = obj_to_array_contiguous_allow_conversion(obj3,
      NPY_INT,
      &is_new_object4);
    if (!array4 || !require_dimensions(array4, 1) ||
      !require_size(array4, size, 1)) SWIG_fail;
    arg4 = (int*) array_data(array4);
    arg5 = (int) array_size(array4,0);
  }
  ecode6 = SWIG_AsVal_int(obj4, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_get_eigenmode_coefficients" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_double(obj5, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_get_eigenmode_coefficients" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  ecode8 = SWIG_AsVal_double(obj6, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_get_eigenmode_coefficients" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  {
    arg9 = (std::complex<double> *)array_data(obj7);
  }
  {
    arg10 = (double *)array_data(obj8);
  }
  {
    if (obj9 == Py_None) {
      arg11 = NULL;
      arg12 = NULL;
    }
    else {
      arg11 = py_kpoint_func_wrap;
      arg12 = (void*)obj9;
    }
  }
  res13 = SWIG_ConvertPtr(obj10, &argp13,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res13)) {
    SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "fields_get_eigenmode_coefficients" "', argument " "13"" of type '" "meep::vec *""'"); 
  }
  arg13 = reinterpret_cast< meep::vec * >(argp13);
  res14 = SWIG_ConvertPtr(obj11, &argp14,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res14)) {
    SWIG_exception_fail(SWIG_ArgError(res14), "in method '" "fields_get_eigenmode_coefficients" "', argument " "14"" of type '" "meep::vec *""'"); 
  }
  arg14 = reinterpret_cast< meep::vec * >(argp14);
  {
    arg15 = (double *)array_data(obj12);
  }
  res16 = SWIG_ConvertPtr(obj13, &argp16,SWIGTYPE_p_meep__diffractedplanewave, 0 |  0 );
  if (!SWIG_IsOK(res16)) {
    SWIG_exception_fail(SWIG_ArgError(res16), "in method '" "fields_get_eigenmode_coefficients" "', argument " "16"" of type '" "meep::diffractedplanewave *""'"); 
  }
  arg16 = reinterpret_cast< meep::diffractedplanewave * >(argp16);
  {
    try {
      (arg1)->get_eigenmode_coefficients(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    if (is_new_object4 && array4)
    {
      Py_DECREF(array4); 
    }
  }
  return resultobj;
fail:
  {
    if (is_new_object4 && array4)
    {
      Py_DECREF(array4); 
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_eigenmode_coefficients__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  SwigValueWrapper< meep::dft_flux > arg2 ;
  meep::volume *arg3 = 0 ;
  int *arg4 = (int *) 0 ;
  int arg5 ;
  int arg6 ;
  double arg7 ;
  double arg8 ;
  std::complex< double > *arg9 = (std::complex< double > *) 0 ;
  double *arg10 = (double *) 0 ;
  meep::kpoint_func arg11 = (meep::kpoint_func) 0 ;
  void *arg12 = (void *) 0 ;
  meep::vec *arg13 = (meep::vec *) 0 ;
  meep::vec *arg14 = (meep::vec *) 0 ;
  double *arg15 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyArrayObject *array4 = NULL ;
  int is_new_object4 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  void *argp13 = 0 ;
  int res13 = 0 ;
  void *argp14 = 0 ;
  int res14 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_eigenmode_coefficients", 13, 13, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_eigenmode_coefficients" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_flux,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_eigenmode_coefficients" "', argument " "2"" of type '" "meep::dft_flux""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode_coefficients" "', argument " "2"" of type '" "meep::dft_flux""'");
    } else {
      meep::dft_flux * temp = reinterpret_cast< meep::dft_flux * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_eigenmode_coefficients" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode_coefficients" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    npy_intp size[1] = {
      -1 
    };
    array4 = obj_to_array_contiguous_allow_conversion(obj3,
      NPY_INT,
      &is_new_object4);
    if (!array4 || !require_dimensions(array4, 1) ||
      !require_size(array4, size, 1)) SWIG_fail;
    arg4 = (int*) array_data(array4);
    arg5 = (int) array_size(array4,0);
  }
  ecode6 = SWIG_AsVal_int(obj4, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_get_eigenmode_coefficients" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_double(obj5, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_get_eigenmode_coefficients" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  ecode8 = SWIG_AsVal_double(obj6, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_get_eigenmode_coefficients" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  {
    arg9 = (std::complex<double> *)array_data(obj7);
  }
  {
    arg10 = (double *)array_data(obj8);
  }
  {
    if (obj9 == Py_None) {
      arg11 = NULL;
      arg12 = NULL;
    }
    else {
      arg11 = py_kpoint_func_wrap;
      arg12 = (void*)obj9;
    }
  }
  res13 = SWIG_ConvertPtr(obj10, &argp13,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res13)) {
    SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "fields_get_eigenmode_coefficients" "', argument " "13"" of type '" "meep::vec *""'"); 
  }
  arg13 = reinterpret_cast< meep::vec * >(argp13);
  res14 = SWIG_ConvertPtr(obj11, &argp14,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res14)) {
    SWIG_exception_fail(SWIG_ArgError(res14), "in method '" "fields_get_eigenmode_coefficients" "', argument " "14"" of type '" "meep::vec *""'"); 
  }
  arg14 = reinterpret_cast< meep::vec * >(argp14);
  {
    arg15 = (double *)array_data(obj12);
  }
  {
    try {
      (arg1)->get_eigenmode_coefficients(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    if (is_new_object4 && array4)
    {
      Py_DECREF(array4); 
    }
  }
  return resultobj;
fail:
  {
    if (is_new_object4 && array4)
    {
      Py_DECREF(array4); 
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_eigenmode_coefficients__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  SwigValueWrapper< meep::dft_flux > arg2 ;
  meep::volume *arg3 = 0 ;
  int *arg4 = (int *) 0 ;
  int arg5 ;
  int arg6 ;
  double arg7 ;
  double arg8 ;
  std::complex< double > *arg9 = (std::complex< double > *) 0 ;
  double *arg10 = (double *) 0 ;
  meep::kpoint_func arg11 = (meep::kpoint_func) 0 ;
  void *arg12 = (void *) 0 ;
  meep::vec *arg13 = (meep::vec *) 0 ;
  meep::vec *arg14 = (meep::vec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyArrayObject *array4 = NULL ;
  int is_new_object4 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  void *argp13 = 0 ;
  int res13 = 0 ;
  void *argp14 = 0 ;
  int res14 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_eigenmode_coefficients", 12, 12, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_eigenmode_coefficients" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_flux,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_eigenmode_coefficients" "', argument " "2"" of type '" "meep::dft_flux""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode_coefficients" "', argument " "2"" of type '" "meep::dft_flux""'");
    } else {
      meep::dft_flux * temp = reinterpret_cast< meep::dft_flux * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_eigenmode_coefficients" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode_coefficients" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    npy_intp size[1] = {
      -1 
    };
    array4 = obj_to_array_contiguous_allow_conversion(obj3,
      NPY_INT,
      &is_new_object4);
    if (!array4 || !require_dimensions(array4, 1) ||
      !require_size(array4, size, 1)) SWIG_fail;
    arg4 = (int*) array_data(array4);
    arg5 = (int) array_size(array4,0);
  }
  ecode6 = SWIG_AsVal_int(obj4, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_get_eigenmode_coefficients" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_double(obj5, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_get_eigenmode_coefficients" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  ecode8 = SWIG_AsVal_double(obj6, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_get_eigenmode_coefficients" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  {
    arg9 = (std::complex<double> *)array_data(obj7);
  }
  {
    arg10 = (double *)array_data(obj8);
  }
  {
    if (obj9 == Py_None) {
      arg11 = NULL;
      arg12 = NULL;
    }
    else {
      arg11 = py_kpoint_func_wrap;
      arg12 = (void*)obj9;
    }
  }
  res13 = SWIG_ConvertPtr(obj10, &argp13,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res13)) {
    SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "fields_get_eigenmode_coefficients" "', argument " "13"" of type '" "meep::vec *""'"); 
  }
  arg13 = reinterpret_cast< meep::vec * >(argp13);
  res14 = SWIG_ConvertPtr(obj11, &argp14,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res14)) {
    SWIG_exception_fail(SWIG_ArgError(res14), "in method '" "fields_get_eigenmode_coefficients" "', argument " "14"" of type '" "meep::vec *""'"); 
  }
  arg14 = reinterpret_cast< meep::vec * >(argp14);
  {
    try {
      (arg1)->get_eigenmode_coefficients(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    if (is_new_object4 && array4)
    {
      Py_DECREF(array4); 
    }
  }
  return resultobj;
fail:
  {
    if (is_new_object4 && array4)
    {
      Py_DECREF(array4); 
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_eigenmode_coefficients__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  SwigValueWrapper< meep::dft_flux > arg2 ;
  meep::volume *arg3 = 0 ;
  int *arg4 = (int *) 0 ;
  int arg5 ;
  int arg6 ;
  double arg7 ;
  double arg8 ;
  std::complex< double > *arg9 = (std::complex< double > *) 0 ;
  double *arg10 = (double *) 0 ;
  meep::kpoint_func arg11 = (meep::kpoint_func) 0 ;
  void *arg12 = (void *) 0 ;
  meep::vec *arg13 = (meep::vec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyArrayObject *array4 = NULL ;
  int is_new_object4 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  void *argp13 = 0 ;
  int res13 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_eigenmode_coefficients", 11, 11, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_eigenmode_coefficients" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_flux,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_eigenmode_coefficients" "', argument " "2"" of type '" "meep::dft_flux""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode_coefficients" "', argument " "2"" of type '" "meep::dft_flux""'");
    } else {
      meep::dft_flux * temp = reinterpret_cast< meep::dft_flux * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_eigenmode_coefficients" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode_coefficients" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    npy_intp size[1] = {
      -1 
    };
    array4 = obj_to_array_contiguous_allow_conversion(obj3,
      NPY_INT,
      &is_new_object4);
    if (!array4 || !require_dimensions(array4, 1) ||
      !require_size(array4, size, 1)) SWIG_fail;
    arg4 = (int*) array_data(array4);
    arg5 = (int) array_size(array4,0);
  }
  ecode6 = SWIG_AsVal_int(obj4, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_get_eigenmode_coefficients" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_double(obj5, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_get_eigenmode_coefficients" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  ecode8 = SWIG_AsVal_double(obj6, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_get_eigenmode_coefficients" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  {
    arg9 = (std::complex<double> *)array_data(obj7);
  }
  {
    arg10 = (double *)array_data(obj8);
  }
  {
    if (obj9 == Py_None) {
      arg11 = NULL;
      arg12 = NULL;
    }
    else {
      arg11 = py_kpoint_func_wrap;
      arg12 = (void*)obj9;
    }
  }
  res13 = SWIG_ConvertPtr(obj10, &argp13,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res13)) {
    SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "fields_get_eigenmode_coefficients" "', argument " "13"" of type '" "meep::vec *""'"); 
  }
  arg13 = reinterpret_cast< meep::vec * >(argp13);
  {
    try {
      (arg1)->get_eigenmode_coefficients(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    if (is_new_object4 && array4)
    {
      Py_DECREF(array4); 
    }
  }
  return resultobj;
fail:
  {
    if (is_new_object4 && array4)
    {
      Py_DECREF(array4); 
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_eigenmode_coefficients__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  SwigValueWrapper< meep::dft_flux > arg2 ;
  meep::volume *arg3 = 0 ;
  int *arg4 = (int *) 0 ;
  int arg5 ;
  int arg6 ;
  double arg7 ;
  double arg8 ;
  std::complex< double > *arg9 = (std::complex< double > *) 0 ;
  double *arg10 = (double *) 0 ;
  meep::kpoint_func arg11 = (meep::kpoint_func) 0 ;
  void *arg12 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyArrayObject *array4 = NULL ;
  int is_new_object4 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_eigenmode_coefficients", 10, 10, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_eigenmode_coefficients" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_flux,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_eigenmode_coefficients" "', argument " "2"" of type '" "meep::dft_flux""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode_coefficients" "', argument " "2"" of type '" "meep::dft_flux""'");
    } else {
      meep::dft_flux * temp = reinterpret_cast< meep::dft_flux * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_eigenmode_coefficients" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode_coefficients" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    npy_intp size[1] = {
      -1 
    };
    array4 = obj_to_array_contiguous_allow_conversion(obj3,
      NPY_INT,
      &is_new_object4);
    if (!array4 || !require_dimensions(array4, 1) ||
      !require_size(array4, size, 1)) SWIG_fail;
    arg4 = (int*) array_data(array4);
    arg5 = (int) array_size(array4,0);
  }
  ecode6 = SWIG_AsVal_int(obj4, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_get_eigenmode_coefficients" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_double(obj5, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_get_eigenmode_coefficients" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  ecode8 = SWIG_AsVal_double(obj6, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_get_eigenmode_coefficients" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  {
    arg9 = (std::complex<double> *)array_data(obj7);
  }
  {
    arg10 = (double *)array_data(obj8);
  }
  {
    if (obj9 == Py_None) {
      arg11 = NULL;
      arg12 = NULL;
    }
    else {
      arg11 = py_kpoint_func_wrap;
      arg12 = (void*)obj9;
    }
  }
  {
    try {
      (arg1)->get_eigenmode_coefficients(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    if (is_new_object4 && array4)
    {
      Py_DECREF(array4); 
    }
  }
  return resultobj;
fail:
  {
    if (is_new_object4 && array4)
    {
      Py_DECREF(array4); 
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_eigenmode_coefficients__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  SwigValueWrapper< meep::dft_flux > arg2 ;
  meep::volume *arg3 = 0 ;
  int *arg4 = (int *) 0 ;
  int arg5 ;
  int arg6 ;
  double arg7 ;
  double arg8 ;
  std::complex< double > *arg9 = (std::complex< double > *) 0 ;
  double *arg10 = (double *) 0 ;
  meep::kpoint_func arg11 = (meep::kpoint_func) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyArrayObject *array4 = NULL ;
  int is_new_object4 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_eigenmode_coefficients", 10, 10, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_eigenmode_coefficients" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_flux,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_eigenmode_coefficients" "', argument " "2"" of type '" "meep::dft_flux""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode_coefficients" "', argument " "2"" of type '" "meep::dft_flux""'");
    } else {
      meep::dft_flux * temp = reinterpret_cast< meep::dft_flux * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_eigenmode_coefficients" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode_coefficients" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    npy_intp size[1] = {
      -1 
    };
    array4 = obj_to_array_contiguous_allow_conversion(obj3,
      NPY_INT,
      &is_new_object4);
    if (!array4 || !require_dimensions(array4, 1) ||
      !require_size(array4, size, 1)) SWIG_fail;
    arg4 = (int*) array_data(array4);
    arg5 = (int) array_size(array4,0);
  }
  ecode6 = SWIG_AsVal_int(obj4, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_get_eigenmode_coefficients" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_double(obj5, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_get_eigenmode_coefficients" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  ecode8 = SWIG_AsVal_double(obj6, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_get_eigenmode_coefficients" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  {
    arg9 = (std::complex<double> *)array_data(obj7);
  }
  {
    arg10 = (double *)array_data(obj8);
  }
  {
    int res = SWIG_ConvertFunctionPtr(obj9, (void**)(&arg11), SWIGTYPE_p_f_double_int_p_void__meep__vec);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_get_eigenmode_coefficients" "', argument " "11"" of type '" "meep::kpoint_func""'"); 
    }
  }
  {
    try {
      (arg1)->get_eigenmode_coefficients(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    if (is_new_object4 && array4)
    {
      Py_DECREF(array4); 
    }
  }
  return resultobj;
fail:
  {
    if (is_new_object4 && array4)
    {
      Py_DECREF(array4); 
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_eigenmode_coefficients__SWIG_8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  SwigValueWrapper< meep::dft_flux > arg2 ;
  meep::volume *arg3 = 0 ;
  int *arg4 = (int *) 0 ;
  int arg5 ;
  int arg6 ;
  double arg7 ;
  double arg8 ;
  std::complex< double > *arg9 = (std::complex< double > *) 0 ;
  double *arg10 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyArrayObject *array4 = NULL ;
  int is_new_object4 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_eigenmode_coefficients", 9, 9, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_eigenmode_coefficients" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_flux,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_eigenmode_coefficients" "', argument " "2"" of type '" "meep::dft_flux""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode_coefficients" "', argument " "2"" of type '" "meep::dft_flux""'");
    } else {
      meep::dft_flux * temp = reinterpret_cast< meep::dft_flux * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_eigenmode_coefficients" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eigenmode_coefficients" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    npy_intp size[1] = {
      -1 
    };
    array4 = obj_to_array_contiguous_allow_conversion(obj3,
      NPY_INT,
      &is_new_object4);
    if (!array4 || !require_dimensions(array4, 1) ||
      !require_size(array4, size, 1)) SWIG_fail;
    arg4 = (int*) array_data(array4);
    arg5 = (int) array_size(array4,0);
  }
  ecode6 = SWIG_AsVal_int(obj4, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_get_eigenmode_coefficients" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_double(obj5, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_get_eigenmode_coefficients" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  ecode8 = SWIG_AsVal_double(obj6, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_get_eigenmode_coefficients" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  {
    arg9 = (std::complex<double> *)array_data(obj7);
  }
  {
    arg10 = (double *)array_data(obj8);
  }
  {
    try {
      (arg1)->get_eigenmode_coefficients(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    if (is_new_object4 && array4)
    {
      Py_DECREF(array4); 
    }
  }
  return resultobj;
fail:
  {
    if (is_new_object4 && array4)
    {
      Py_DECREF(array4); 
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_eigenmode_coefficients(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[16] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 15) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 9) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            _v = is_array(argv[3]) || PySequence_Check(argv[3]);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_double(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    _v = is_array(argv[7]);
                  }
                  if (_v) {
                    {
                      _v = is_array(argv[8]);
                    }
                    if (_v) {
                      return _wrap_fields_get_eigenmode_coefficients__SWIG_8(self, args);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 10) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            _v = is_array(argv[3]) || PySequence_Check(argv[3]);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_double(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    _v = is_array(argv[7]);
                  }
                  if (_v) {
                    {
                      _v = is_array(argv[8]);
                    }
                    if (_v) {
                      void *ptr = 0;
                      int res = SWIG_ConvertFunctionPtr(argv[9], &ptr, SWIGTYPE_p_f_double_int_p_void__meep__vec);
                      _v = SWIG_CheckState(res);
                      if (_v) {
                        return _wrap_fields_get_eigenmode_coefficients__SWIG_7(self, args);
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 10) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            _v = is_array(argv[3]) || PySequence_Check(argv[3]);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_double(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    _v = is_array(argv[7]);
                  }
                  if (_v) {
                    {
                      _v = is_array(argv[8]);
                    }
                    if (_v) {
                      {
                        _v = PyFunction_Check(argv[9]) || argv[9] == Py_None;
                      }
                      if (_v) {
                        if (argc <= 10) {
                          return _wrap_fields_get_eigenmode_coefficients__SWIG_6(self, args);
                        }
                        return _wrap_fields_get_eigenmode_coefficients__SWIG_6(self, args);
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 11) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            _v = is_array(argv[3]) || PySequence_Check(argv[3]);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_double(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    _v = is_array(argv[7]);
                  }
                  if (_v) {
                    {
                      _v = is_array(argv[8]);
                    }
                    if (_v) {
                      {
                        _v = PyFunction_Check(argv[9]) || argv[9] == Py_None;
                      }
                      if (_v) {
                        void *vptr = 0;
                        int res = SWIG_ConvertPtr(argv[10], &vptr, SWIGTYPE_p_meep__vec, 0);
                        _v = SWIG_CheckState(res);
                        if (_v) {
                          return _wrap_fields_get_eigenmode_coefficients__SWIG_5(self, args);
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 12) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            _v = is_array(argv[3]) || PySequence_Check(argv[3]);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_double(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    _v = is_array(argv[7]);
                  }
                  if (_v) {
                    {
                      _v = is_array(argv[8]);
                    }
                    if (_v) {
                      {
                        _v = PyFunction_Check(argv[9]) || argv[9] == Py_None;
                      }
                      if (_v) {
                        void *vptr = 0;
                        int res = SWIG_ConvertPtr(argv[10], &vptr, SWIGTYPE_p_meep__vec, 0);
                        _v = SWIG_CheckState(res);
                        if (_v) {
                          void *vptr = 0;
                          int res = SWIG_ConvertPtr(argv[11], &vptr, SWIGTYPE_p_meep__vec, 0);
                          _v = SWIG_CheckState(res);
                          if (_v) {
                            return _wrap_fields_get_eigenmode_coefficients__SWIG_4(self, args);
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 13) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            _v = is_array(argv[3]) || PySequence_Check(argv[3]);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_double(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    _v = is_array(argv[7]);
                  }
                  if (_v) {
                    {
                      _v = is_array(argv[8]);
                    }
                    if (_v) {
                      {
                        _v = PyFunction_Check(argv[9]) || argv[9] == Py_None;
                      }
                      if (_v) {
                        void *vptr = 0;
                        int res = SWIG_ConvertPtr(argv[10], &vptr, SWIGTYPE_p_meep__vec, 0);
                        _v = SWIG_CheckState(res);
                        if (_v) {
                          void *vptr = 0;
                          int res = SWIG_ConvertPtr(argv[11], &vptr, SWIGTYPE_p_meep__vec, 0);
                          _v = SWIG_CheckState(res);
                          if (_v) {
                            {
                              _v = is_array(argv[12]);
                            }
                            if (_v) {
                              return _wrap_fields_get_eigenmode_coefficients__SWIG_3(self, args);
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 14) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            _v = is_array(argv[3]) || PySequence_Check(argv[3]);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_double(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    _v = is_array(argv[7]);
                  }
                  if (_v) {
                    {
                      _v = is_array(argv[8]);
                    }
                    if (_v) {
                      {
                        _v = PyFunction_Check(argv[9]) || argv[9] == Py_None;
                      }
                      if (_v) {
                        void *vptr = 0;
                        int res = SWIG_ConvertPtr(argv[10], &vptr, SWIGTYPE_p_meep__vec, 0);
                        _v = SWIG_CheckState(res);
                        if (_v) {
                          void *vptr = 0;
                          int res = SWIG_ConvertPtr(argv[11], &vptr, SWIGTYPE_p_meep__vec, 0);
                          _v = SWIG_CheckState(res);
                          if (_v) {
                            {
                              _v = is_array(argv[12]);
                            }
                            if (_v) {
                              void *vptr = 0;
                              int res = SWIG_ConvertPtr(argv[13], &vptr, SWIGTYPE_p_meep__diffractedplanewave, 0);
                              _v = SWIG_CheckState(res);
                              if (_v) {
                                return _wrap_fields_get_eigenmode_coefficients__SWIG_2(self, args);
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 14) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            _v = is_array(argv[3]) || PySequence_Check(argv[3]);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_double(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    _v = is_array(argv[7]);
                  }
                  if (_v) {
                    {
                      _v = is_array(argv[8]);
                    }
                    if (_v) {
                      {
                        _v = PyFunction_Check(argv[9]) || argv[9] == Py_None;
                      }
                      if (_v) {
                        void *vptr = 0;
                        int res = SWIG_ConvertPtr(argv[10], &vptr, SWIGTYPE_p_meep__vec, 0);
                        _v = SWIG_CheckState(res);
                        if (_v) {
                          void *vptr = 0;
                          int res = SWIG_ConvertPtr(argv[11], &vptr, SWIGTYPE_p_meep__vec, 0);
                          _v = SWIG_CheckState(res);
                          if (_v) {
                            {
                              _v = is_array(argv[12]);
                            }
                            if (_v) {
                              {
                                int res = SWIG_AsVal_int(argv[13], NULL);
                                _v = SWIG_CheckState(res);
                              }
                              if (_v) {
                                return _wrap_fields_get_eigenmode_coefficients__SWIG_1(self, args);
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 15) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            _v = is_array(argv[3]) || PySequence_Check(argv[3]);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_double(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    _v = is_array(argv[7]);
                  }
                  if (_v) {
                    {
                      _v = is_array(argv[8]);
                    }
                    if (_v) {
                      {
                        _v = PyFunction_Check(argv[9]) || argv[9] == Py_None;
                      }
                      if (_v) {
                        void *vptr = 0;
                        int res = SWIG_ConvertPtr(argv[10], &vptr, SWIGTYPE_p_meep__vec, 0);
                        _v = SWIG_CheckState(res);
                        if (_v) {
                          void *vptr = 0;
                          int res = SWIG_ConvertPtr(argv[11], &vptr, SWIGTYPE_p_meep__vec, 0);
                          _v = SWIG_CheckState(res);
                          if (_v) {
                            {
                              _v = is_array(argv[12]);
                            }
                            if (_v) {
                              {
                                int res = SWIG_AsVal_int(argv[13], NULL);
                                _v = SWIG_CheckState(res);
                              }
                              if (_v) {
                                void *vptr = 0;
                                int res = SWIG_ConvertPtr(argv[14], &vptr, SWIGTYPE_p_meep__diffractedplanewave, 0);
                                _v = SWIG_CheckState(res);
                                if (_v) {
                                  return _wrap_fields_get_eigenmode_coefficients__SWIG_0(self, args);
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_get_eigenmode_coefficients'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::get_eigenmode_coefficients(meep::dft_flux,meep::volume const &,int *,int,int,double,double,std::complex< double > *,double *,meep::kpoint_func,void *,meep::vec *,meep::vec *,double *,meep::direction,meep::diffractedplanewave *)\n"
    "    meep::fields::get_eigenmode_coefficients(meep::dft_flux,meep::volume const &,int *,int,int,double,double,std::complex< double > *,double *,meep::kpoint_func,void *,meep::vec *,meep::vec *,double *,meep::direction)\n"
    "    meep::fields::get_eigenmode_coefficients(meep::dft_flux,meep::volume const &,int *,int,int,double,double,std::complex< double > *,double *,meep::kpoint_func,void *,meep::vec *,meep::vec *,double *,meep::diffractedplanewave *)\n"
    "    meep::fields::get_eigenmode_coefficients(meep::dft_flux,meep::volume const &,int *,int,int,double,double,std::complex< double > *,double *,meep::kpoint_func,void *,meep::vec *,meep::vec *,double *)\n"
    "    meep::fields::get_eigenmode_coefficients(meep::dft_flux,meep::volume const &,int *,int,int,double,double,std::complex< double > *,double *,meep::kpoint_func,void *,meep::vec *,meep::vec *)\n"
    "    meep::fields::get_eigenmode_coefficients(meep::dft_flux,meep::volume const &,int *,int,int,double,double,std::complex< double > *,double *,meep::kpoint_func,void *,meep::vec *)\n"
    "    meep::fields::get_eigenmode_coefficients(meep::dft_flux,meep::volume const &,int *,int,int,double,double,std::complex< double > *,double *,meep::kpoint_func,void *)\n"
    "    meep::fields::get_eigenmode_coefficients(meep::dft_flux,meep::volume const &,int *,int,int,double,double,std::complex< double > *,double *,meep::kpoint_func)\n"
    "    meep::fields::get_eigenmode_coefficients(meep::dft_flux,meep::volume const &,int *,int,int,double,double,std::complex< double > *,double *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_initialize_field(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  std::complex< double > (*arg3)(meep::vec const &) = (std::complex< double > (*)(meep::vec const &)) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_initialize_field", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_initialize_field" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    if (obj2 != Py_None) {
      arg3 = py_amp_func_wrap;
      py_amp_func = obj2;
      Py_INCREF(py_amp_func);
    }
    else
    arg3 = NULL;
  }
  {
    try {
      (arg1)->initialize_field(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    Py_XDECREF(py_amp_func);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_amp_func);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_initialize_with_nth_te(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_initialize_with_nth_te", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_initialize_with_nth_te" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_initialize_with_nth_te" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      (arg1)->initialize_with_nth_te(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_initialize_with_nth_tm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_initialize_with_nth_tm", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_initialize_with_nth_tm" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_initialize_with_nth_tm" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      (arg1)->initialize_with_nth_tm(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_initialize_with_n_te(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_initialize_with_n_te", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_initialize_with_n_te" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_initialize_with_n_te" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      (arg1)->initialize_with_n_te(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_initialize_with_n_tm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_initialize_with_n_tm", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_initialize_with_n_tm" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_initialize_with_n_tm" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      (arg1)->initialize_with_n_tm(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_phase_in_material(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::structure *arg2 = (meep::structure *) 0 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "fields_phase_in_material", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_phase_in_material" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_phase_in_material" "', argument " "2"" of type '" "meep::structure const *""'"); 
  }
  arg2 = reinterpret_cast< meep::structure * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_phase_in_material" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      result = (int)(arg1)->phase_in_material((meep::structure const *)arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_is_phasing(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "fields_is_phasing", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_is_phasing" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      result = (int)(arg1)->is_phasing();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_vec2diel_floor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = 0 ;
  double arg2 ;
  meep::ivec *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "fields_vec2diel_floor", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_vec2diel_floor" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_vec2diel_floor" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_vec2diel_floor" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_vec2diel_floor" "', argument " "3"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_vec2diel_floor" "', argument " "3"" of type '" "meep::ivec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::ivec * >(argp3);
  {
    try {
      result = meep::fields::vec2diel_floor((meep::vec const &)*arg1,arg2,(meep::ivec const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_vec2diel_ceil(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = 0 ;
  double arg2 ;
  meep::ivec *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::ivec result;
  
  if (!PyArg_UnpackTuple(args, "fields_vec2diel_ceil", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_vec2diel_ceil" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_vec2diel_ceil" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_vec2diel_ceil" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_vec2diel_ceil" "', argument " "3"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_vec2diel_ceil" "', argument " "3"" of type '" "meep::ivec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::ivec * >(argp3);
  {
    try {
      result = meep::fields::vec2diel_ceil((meep::vec const &)*arg1,arg2,(meep::ivec const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::ivec(static_cast< const meep::ivec& >(result))), SWIGTYPE_p_meep__ivec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_loop_in_chunks__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::field_chunkloop arg2 = (meep::field_chunkloop) 0 ;
  void *arg3 = (void *) 0 ;
  meep::volume *arg4 = 0 ;
  meep::component arg5 ;
  bool arg6 ;
  bool arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res3 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_loop_in_chunks", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_loop_in_chunks" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_loop_in_chunks" "', argument " "2"" of type '" "meep::field_chunkloop""'"); 
    }
  }
  res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_loop_in_chunks" "', argument " "3"" of type '" "void *""'"); 
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_loop_in_chunks" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_loop_in_chunks" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  arg4 = reinterpret_cast< meep::volume * >(argp4);
  {
    arg5 = static_cast<meep::component>(PyInteger_AsLong(obj4));
  }
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_loop_in_chunks" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_loop_in_chunks" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  {
    try {
      (arg1)->loop_in_chunks(arg2,arg3,(meep::volume const &)*arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_loop_in_chunks__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::field_chunkloop arg2 = (meep::field_chunkloop) 0 ;
  void *arg3 = (void *) 0 ;
  meep::volume *arg4 = 0 ;
  meep::component arg5 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res3 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_loop_in_chunks", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_loop_in_chunks" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_loop_in_chunks" "', argument " "2"" of type '" "meep::field_chunkloop""'"); 
    }
  }
  res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_loop_in_chunks" "', argument " "3"" of type '" "void *""'"); 
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_loop_in_chunks" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_loop_in_chunks" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  arg4 = reinterpret_cast< meep::volume * >(argp4);
  {
    arg5 = static_cast<meep::component>(PyInteger_AsLong(obj4));
  }
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_loop_in_chunks" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      (arg1)->loop_in_chunks(arg2,arg3,(meep::volume const &)*arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_loop_in_chunks__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::field_chunkloop arg2 = (meep::field_chunkloop) 0 ;
  void *arg3 = (void *) 0 ;
  meep::volume *arg4 = 0 ;
  meep::component arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res3 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_loop_in_chunks", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_loop_in_chunks" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_loop_in_chunks" "', argument " "2"" of type '" "meep::field_chunkloop""'"); 
    }
  }
  res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_loop_in_chunks" "', argument " "3"" of type '" "void *""'"); 
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_loop_in_chunks" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_loop_in_chunks" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  arg4 = reinterpret_cast< meep::volume * >(argp4);
  {
    arg5 = static_cast<meep::component>(PyInteger_AsLong(obj4));
  }
  {
    try {
      (arg1)->loop_in_chunks(arg2,arg3,(meep::volume const &)*arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_loop_in_chunks__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::field_chunkloop arg2 = (meep::field_chunkloop) 0 ;
  void *arg3 = (void *) 0 ;
  meep::volume *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res3 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_loop_in_chunks", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_loop_in_chunks" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_loop_in_chunks" "', argument " "2"" of type '" "meep::field_chunkloop""'"); 
    }
  }
  res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_loop_in_chunks" "', argument " "3"" of type '" "void *""'"); 
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_loop_in_chunks" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_loop_in_chunks" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  arg4 = reinterpret_cast< meep::volume * >(argp4);
  {
    try {
      (arg1)->loop_in_chunks(arg2,arg3,(meep::volume const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_loop_in_chunks(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[8] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 7) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *ptr = 0;
      int res = SWIG_ConvertFunctionPtr(argv[1], &ptr, SWIGTYPE_p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *ptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_fields_loop_in_chunks__SWIG_3(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *ptr = 0;
      int res = SWIG_ConvertFunctionPtr(argv[1], &ptr, SWIGTYPE_p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *ptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              _v = PyInteger_Check(argv[4]) && PyInteger_AsLong(argv[4]) < 100;
            }
            if (_v) {
              return _wrap_fields_loop_in_chunks__SWIG_2(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *ptr = 0;
      int res = SWIG_ConvertFunctionPtr(argv[1], &ptr, SWIGTYPE_p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *ptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              _v = PyInteger_Check(argv[4]) && PyInteger_AsLong(argv[4]) < 100;
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_loop_in_chunks__SWIG_1(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *ptr = 0;
      int res = SWIG_ConvertFunctionPtr(argv[1], &ptr, SWIGTYPE_p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *ptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &ptr, 0, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              _v = PyInteger_Check(argv[4]) && PyInteger_AsLong(argv[4]) < 100;
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_fields_loop_in_chunks__SWIG_0(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_loop_in_chunks'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::loop_in_chunks(meep::field_chunkloop,void *,meep::volume const &,meep::component,bool,bool)\n"
    "    meep::fields::loop_in_chunks(meep::field_chunkloop,void *,meep::volume const &,meep::component,bool)\n"
    "    meep::fields::loop_in_chunks(meep::field_chunkloop,void *,meep::volume const &,meep::component)\n"
    "    meep::fields::loop_in_chunks(meep::field_chunkloop,void *,meep::volume const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_integrate__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  int arg2 ;
  meep::component *arg3 = (meep::component *) 0 ;
  meep::field_function arg4 = (meep::field_function) 0 ;
  void *arg5 = (void *) 0 ;
  meep::volume *arg6 = 0 ;
  double *arg7 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  py_field_func_data tmp_data2 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_integrate", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_integrate" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    if (!PySequence_Check(obj1)) {
      meep::abort("Expected a sequence");
    }
    
    PyObject *cs = PyList_GetItem(obj1, 0);
    
    if (!PySequence_Check(cs)) {
      meep::abort("Expected first item in list to be a list");
    }
    
    PyObject *func = PyList_GetItem(obj1, 1);
    
    if (!PyCallable_Check(func)) {
      meep::abort("Expected a function");
    }
    
    arg2 = PyList_Size(cs);
    arg3 = new meep::component[arg2];
    
    for (Py_ssize_t i = 0; i < arg2; i++) {
      arg3[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(cs, i));
    }
    
    arg4 = py_field_func_wrap;
    
    tmp_data2.num_components = arg2;
    tmp_data2.func = func;
    Py_INCREF(tmp_data2.func);
    arg5 = &tmp_data2;
  }
  res6 = SWIG_ConvertPtr(obj2, &argp6, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_integrate" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  if (!argp6) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_integrate" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  arg6 = reinterpret_cast< meep::volume * >(argp6);
  res7 = SWIG_ConvertPtr(obj3, &argp7,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_integrate" "', argument " "7"" of type '" "double *""'"); 
  }
  arg7 = reinterpret_cast< double * >(argp7);
  {
    try {
      result = (arg1)->integrate(arg2,(meep::component const *)arg3,arg4,arg5,(meep::volume const &)*arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  {
    delete[] arg3;
    Py_XDECREF(tmp_data2.func);
  }
  return resultobj;
fail:
  {
    delete[] arg3;
    Py_XDECREF(tmp_data2.func);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_integrate__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  int arg2 ;
  meep::component *arg3 = (meep::component *) 0 ;
  meep::field_function arg4 = (meep::field_function) 0 ;
  void *arg5 = (void *) 0 ;
  meep::volume *arg6 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  py_field_func_data tmp_data2 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_integrate", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_integrate" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    if (!PySequence_Check(obj1)) {
      meep::abort("Expected a sequence");
    }
    
    PyObject *cs = PyList_GetItem(obj1, 0);
    
    if (!PySequence_Check(cs)) {
      meep::abort("Expected first item in list to be a list");
    }
    
    PyObject *func = PyList_GetItem(obj1, 1);
    
    if (!PyCallable_Check(func)) {
      meep::abort("Expected a function");
    }
    
    arg2 = PyList_Size(cs);
    arg3 = new meep::component[arg2];
    
    for (Py_ssize_t i = 0; i < arg2; i++) {
      arg3[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(cs, i));
    }
    
    arg4 = py_field_func_wrap;
    
    tmp_data2.num_components = arg2;
    tmp_data2.func = func;
    Py_INCREF(tmp_data2.func);
    arg5 = &tmp_data2;
  }
  res6 = SWIG_ConvertPtr(obj2, &argp6, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_integrate" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  if (!argp6) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_integrate" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  arg6 = reinterpret_cast< meep::volume * >(argp6);
  {
    try {
      result = (arg1)->integrate(arg2,(meep::component const *)arg3,arg4,arg5,(meep::volume const &)*arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  {
    delete[] arg3;
    Py_XDECREF(tmp_data2.func);
  }
  return resultobj;
fail:
  {
    delete[] arg3;
    Py_XDECREF(tmp_data2.func);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_integrate__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  int arg2 ;
  meep::component *arg3 = (meep::component *) 0 ;
  meep::field_rfunction arg4 = (meep::field_rfunction) 0 ;
  void *arg5 = (void *) 0 ;
  meep::volume *arg6 = 0 ;
  double *arg7 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res5 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_integrate", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_integrate" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_integrate" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__component, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_integrate" "', argument " "3"" of type '" "meep::component const *""'"); 
  }
  arg3 = reinterpret_cast< meep::component * >(argp3);
  {
    int res = SWIG_ConvertFunctionPtr(obj3, (void**)(&arg4), SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_integrate" "', argument " "4"" of type '" "meep::field_rfunction""'"); 
    }
  }
  res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_integrate" "', argument " "5"" of type '" "void *""'"); 
  }
  res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_integrate" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  if (!argp6) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_integrate" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  arg6 = reinterpret_cast< meep::volume * >(argp6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_integrate" "', argument " "7"" of type '" "double *""'"); 
  }
  arg7 = reinterpret_cast< double * >(argp7);
  {
    try {
      result = (double)(arg1)->integrate(arg2,(meep::component const *)arg3,arg4,arg5,(meep::volume const &)*arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_integrate__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  int arg2 ;
  meep::component *arg3 = (meep::component *) 0 ;
  meep::field_rfunction arg4 = (meep::field_rfunction) 0 ;
  void *arg5 = (void *) 0 ;
  meep::volume *arg6 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res5 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_integrate", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_integrate" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_integrate" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__component, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_integrate" "', argument " "3"" of type '" "meep::component const *""'"); 
  }
  arg3 = reinterpret_cast< meep::component * >(argp3);
  {
    int res = SWIG_ConvertFunctionPtr(obj3, (void**)(&arg4), SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_integrate" "', argument " "4"" of type '" "meep::field_rfunction""'"); 
    }
  }
  res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_integrate" "', argument " "5"" of type '" "void *""'"); 
  }
  res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_integrate" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  if (!argp6) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_integrate" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  arg6 = reinterpret_cast< meep::volume * >(argp6);
  {
    try {
      result = (double)(arg1)->integrate(arg2,(meep::component const *)arg3,arg4,arg5,(meep::volume const &)*arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_integrate(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[8] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 7) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySequence_Check(argv[1]) &&
        PySequence_Check(PyList_GetItem(argv[1], 0)) &&
        PyCallable_Check(PyList_GetItem(argv[1], 1));
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_fields_integrate__SWIG_1(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySequence_Check(argv[1]) &&
        PySequence_Check(PyList_GetItem(argv[1], 0)) &&
        PyCallable_Check(PyList_GetItem(argv[1], 1));
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_fields_integrate__SWIG_0(self, args);
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          _v = PyList_Check(argv[2]);
        }
        if (_v) {
          void *ptr = 0;
          int res = SWIG_ConvertFunctionPtr(argv[3], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &ptr, 0, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              int res = SWIG_ConvertPtr(argv[5], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                return _wrap_fields_integrate__SWIG_3(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          _v = PyList_Check(argv[2]);
        }
        if (_v) {
          void *ptr = 0;
          int res = SWIG_ConvertFunctionPtr(argv[3], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &ptr, 0, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              int res = SWIG_ConvertPtr(argv[5], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_double, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  return _wrap_fields_integrate__SWIG_2(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_integrate'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::integrate(int,meep::component const *,meep::field_function,void *,meep::volume const &,double *)\n"
    "    meep::fields::integrate(int,meep::component const *,meep::field_function,void *,meep::volume const &)\n"
    "    meep::fields::integrate(int,meep::component const *,meep::field_rfunction,void *,meep::volume const &,double *)\n"
    "    meep::fields::integrate(int,meep::component const *,meep::field_rfunction,void *,meep::volume const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_integrate2__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::fields *arg2 = 0 ;
  int arg3 ;
  meep::component *arg4 = (meep::component *) 0 ;
  int arg5 ;
  meep::component *arg6 = (meep::component *) 0 ;
  meep::field_function arg7 = (meep::field_function) 0 ;
  void *arg8 = (void *) 0 ;
  meep::volume *arg9 = 0 ;
  double *arg10 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  py_field_func_data data3 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_integrate2", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_integrate2" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_integrate2" "', argument " "2"" of type '" "meep::fields const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_integrate2" "', argument " "2"" of type '" "meep::fields const &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  {
    if (!PySequence_Check(obj2)) {
      meep::abort("Expected a sequence");
    }
    
    PyObject *cs1 = PyList_GetItem(obj2, 0);
    
    if (!PySequence_Check(cs1)) {
      meep::abort("Expected 1st item in list to be a sequence");
    }
    
    PyObject *cs2 = PyList_GetItem(obj2, 1);
    
    if (!PySequence_Check(cs2)) {
      meep::abort("Expected 2nd item in list to be a sequence");
    }
    
    PyObject *func = PyList_GetItem(obj2, 2);
    
    if (!PyCallable_Check(func)) {
      meep::abort("Expected 3rd item in list to be a function");
    }
    
    arg3 = PyList_Size(cs1);
    arg5 = PyList_Size(cs2);
    
    arg4 = new meep::component[arg3];
    arg6 = new meep::component[arg5];
    
    for (Py_ssize_t i = 0; i < arg3; i++) {
      arg4[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(cs1, i));
    }
    
    for (Py_ssize_t i = 0; i < arg5; i++) {
      arg6[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(cs2, i));
    }
    
    arg7 = py_field_func_wrap;
    
    data3.num_components = arg3 + arg5;
    data3.func = func;
    Py_INCREF(func);
    arg8 = &data3;
  }
  res9 = SWIG_ConvertPtr(obj3, &argp9, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_integrate2" "', argument " "9"" of type '" "meep::volume const &""'"); 
  }
  if (!argp9) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_integrate2" "', argument " "9"" of type '" "meep::volume const &""'"); 
  }
  arg9 = reinterpret_cast< meep::volume * >(argp9);
  res10 = SWIG_ConvertPtr(obj4, &argp10,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "fields_integrate2" "', argument " "10"" of type '" "double *""'"); 
  }
  arg10 = reinterpret_cast< double * >(argp10);
  {
    try {
      result = (arg1)->integrate2((meep::fields const &)*arg2,arg3,(meep::component const *)arg4,arg5,(meep::component const *)arg6,arg7,arg8,(meep::volume const &)*arg9,arg10);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  {
    delete[] arg4;
    delete[] arg6;
    Py_XDECREF(data3.func);
  }
  return resultobj;
fail:
  {
    delete[] arg4;
    delete[] arg6;
    Py_XDECREF(data3.func);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_integrate2__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::fields *arg2 = 0 ;
  int arg3 ;
  meep::component *arg4 = (meep::component *) 0 ;
  int arg5 ;
  meep::component *arg6 = (meep::component *) 0 ;
  meep::field_function arg7 = (meep::field_function) 0 ;
  void *arg8 = (void *) 0 ;
  meep::volume *arg9 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  py_field_func_data data3 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_integrate2", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_integrate2" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_integrate2" "', argument " "2"" of type '" "meep::fields const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_integrate2" "', argument " "2"" of type '" "meep::fields const &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  {
    if (!PySequence_Check(obj2)) {
      meep::abort("Expected a sequence");
    }
    
    PyObject *cs1 = PyList_GetItem(obj2, 0);
    
    if (!PySequence_Check(cs1)) {
      meep::abort("Expected 1st item in list to be a sequence");
    }
    
    PyObject *cs2 = PyList_GetItem(obj2, 1);
    
    if (!PySequence_Check(cs2)) {
      meep::abort("Expected 2nd item in list to be a sequence");
    }
    
    PyObject *func = PyList_GetItem(obj2, 2);
    
    if (!PyCallable_Check(func)) {
      meep::abort("Expected 3rd item in list to be a function");
    }
    
    arg3 = PyList_Size(cs1);
    arg5 = PyList_Size(cs2);
    
    arg4 = new meep::component[arg3];
    arg6 = new meep::component[arg5];
    
    for (Py_ssize_t i = 0; i < arg3; i++) {
      arg4[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(cs1, i));
    }
    
    for (Py_ssize_t i = 0; i < arg5; i++) {
      arg6[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(cs2, i));
    }
    
    arg7 = py_field_func_wrap;
    
    data3.num_components = arg3 + arg5;
    data3.func = func;
    Py_INCREF(func);
    arg8 = &data3;
  }
  res9 = SWIG_ConvertPtr(obj3, &argp9, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_integrate2" "', argument " "9"" of type '" "meep::volume const &""'"); 
  }
  if (!argp9) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_integrate2" "', argument " "9"" of type '" "meep::volume const &""'"); 
  }
  arg9 = reinterpret_cast< meep::volume * >(argp9);
  {
    try {
      result = (arg1)->integrate2((meep::fields const &)*arg2,arg3,(meep::component const *)arg4,arg5,(meep::component const *)arg6,arg7,arg8,(meep::volume const &)*arg9);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  {
    delete[] arg4;
    delete[] arg6;
    Py_XDECREF(data3.func);
  }
  return resultobj;
fail:
  {
    delete[] arg4;
    delete[] arg6;
    Py_XDECREF(data3.func);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_integrate2__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::fields *arg2 = 0 ;
  int arg3 ;
  meep::component *arg4 = (meep::component *) 0 ;
  int arg5 ;
  meep::component *arg6 = (meep::component *) 0 ;
  meep::field_rfunction arg7 = (meep::field_rfunction) 0 ;
  void *arg8 = (void *) 0 ;
  meep::volume *arg9 = 0 ;
  double *arg10 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  int res8 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_integrate2", 10, 10, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_integrate2" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_integrate2" "', argument " "2"" of type '" "meep::fields const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_integrate2" "', argument " "2"" of type '" "meep::fields const &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_integrate2" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__component, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_integrate2" "', argument " "4"" of type '" "meep::component const *""'"); 
  }
  arg4 = reinterpret_cast< meep::component * >(argp4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_integrate2" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_meep__component, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_integrate2" "', argument " "6"" of type '" "meep::component const *""'"); 
  }
  arg6 = reinterpret_cast< meep::component * >(argp6);
  {
    int res = SWIG_ConvertFunctionPtr(obj6, (void**)(&arg7), SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_integrate2" "', argument " "7"" of type '" "meep::field_rfunction""'"); 
    }
  }
  res8 = SWIG_ConvertPtr(obj7,SWIG_as_voidptrptr(&arg8), 0, 0);
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_integrate2" "', argument " "8"" of type '" "void *""'"); 
  }
  res9 = SWIG_ConvertPtr(obj8, &argp9, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_integrate2" "', argument " "9"" of type '" "meep::volume const &""'"); 
  }
  if (!argp9) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_integrate2" "', argument " "9"" of type '" "meep::volume const &""'"); 
  }
  arg9 = reinterpret_cast< meep::volume * >(argp9);
  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "fields_integrate2" "', argument " "10"" of type '" "double *""'"); 
  }
  arg10 = reinterpret_cast< double * >(argp10);
  {
    try {
      result = (double)(arg1)->integrate2((meep::fields const &)*arg2,arg3,(meep::component const *)arg4,arg5,(meep::component const *)arg6,arg7,arg8,(meep::volume const &)*arg9,arg10);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_integrate2__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::fields *arg2 = 0 ;
  int arg3 ;
  meep::component *arg4 = (meep::component *) 0 ;
  int arg5 ;
  meep::component *arg6 = (meep::component *) 0 ;
  meep::field_rfunction arg7 = (meep::field_rfunction) 0 ;
  void *arg8 = (void *) 0 ;
  meep::volume *arg9 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  int res8 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_integrate2", 9, 9, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_integrate2" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__fields,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_integrate2" "', argument " "2"" of type '" "meep::fields const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_integrate2" "', argument " "2"" of type '" "meep::fields const &""'"); 
  }
  arg2 = reinterpret_cast< meep::fields * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_integrate2" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_meep__component, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_integrate2" "', argument " "4"" of type '" "meep::component const *""'"); 
  }
  arg4 = reinterpret_cast< meep::component * >(argp4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_integrate2" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_meep__component, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_integrate2" "', argument " "6"" of type '" "meep::component const *""'"); 
  }
  arg6 = reinterpret_cast< meep::component * >(argp6);
  {
    int res = SWIG_ConvertFunctionPtr(obj6, (void**)(&arg7), SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_integrate2" "', argument " "7"" of type '" "meep::field_rfunction""'"); 
    }
  }
  res8 = SWIG_ConvertPtr(obj7,SWIG_as_voidptrptr(&arg8), 0, 0);
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_integrate2" "', argument " "8"" of type '" "void *""'"); 
  }
  res9 = SWIG_ConvertPtr(obj8, &argp9, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_integrate2" "', argument " "9"" of type '" "meep::volume const &""'"); 
  }
  if (!argp9) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_integrate2" "', argument " "9"" of type '" "meep::volume const &""'"); 
  }
  arg9 = reinterpret_cast< meep::volume * >(argp9);
  {
    try {
      result = (double)(arg1)->integrate2((meep::fields const &)*arg2,arg3,(meep::component const *)arg4,arg5,(meep::component const *)arg6,arg7,arg8,(meep::volume const &)*arg9);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_integrate2(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[11] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 10) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PySequence_Check(argv[2]) &&
          PySequence_Check(PyList_GetItem(argv[2], 0)) &&
          PySequence_Check(PyList_GetItem(argv[2], 1)) &&
          PyCallable_Check(PyList_GetItem(argv[2], 2));
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_fields_integrate2__SWIG_1(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PySequence_Check(argv[2]) &&
          PySequence_Check(PyList_GetItem(argv[2], 0)) &&
          PySequence_Check(PyList_GetItem(argv[2], 1)) &&
          PyCallable_Check(PyList_GetItem(argv[2], 2));
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_double, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_fields_integrate2__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 9) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__component, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              void *vptr = 0;
              int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_meep__component, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                void *ptr = 0;
                int res = SWIG_ConvertFunctionPtr(argv[6], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *ptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &ptr, 0, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    int res = SWIG_ConvertPtr(argv[8], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      return _wrap_fields_integrate2__SWIG_3(self, args);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 10) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__fields, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_meep__component, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              void *vptr = 0;
              int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_meep__component, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                void *ptr = 0;
                int res = SWIG_ConvertFunctionPtr(argv[6], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *ptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &ptr, 0, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    int res = SWIG_ConvertPtr(argv[8], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      void *vptr = 0;
                      int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_double, 0);
                      _v = SWIG_CheckState(res);
                      if (_v) {
                        return _wrap_fields_integrate2__SWIG_2(self, args);
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_integrate2'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::integrate2(meep::fields const &,int,meep::component const *,int,meep::component const *,meep::field_function,void *,meep::volume const &,double *)\n"
    "    meep::fields::integrate2(meep::fields const &,int,meep::component const *,int,meep::component const *,meep::field_function,void *,meep::volume const &)\n"
    "    meep::fields::integrate2(meep::fields const &,int,meep::component const *,int,meep::component const *,meep::field_rfunction,void *,meep::volume const &,double *)\n"
    "    meep::fields::integrate2(meep::fields const &,int,meep::component const *,int,meep::component const *,meep::field_rfunction,void *,meep::volume const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_max_abs__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  int arg2 ;
  meep::component *arg3 = (meep::component *) 0 ;
  meep::field_function arg4 = (meep::field_function) 0 ;
  void *arg5 = (void *) 0 ;
  meep::volume *arg6 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  py_field_func_data tmp_data2 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_max_abs", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_max_abs" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    if (!PySequence_Check(obj1)) {
      meep::abort("Expected a sequence");
    }
    
    PyObject *cs = PyList_GetItem(obj1, 0);
    
    if (!PySequence_Check(cs)) {
      meep::abort("Expected first item in list to be a list");
    }
    
    PyObject *func = PyList_GetItem(obj1, 1);
    
    if (!PyCallable_Check(func)) {
      meep::abort("Expected a function");
    }
    
    arg2 = PyList_Size(cs);
    arg3 = new meep::component[arg2];
    
    for (Py_ssize_t i = 0; i < arg2; i++) {
      arg3[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(cs, i));
    }
    
    arg4 = py_field_func_wrap;
    
    tmp_data2.num_components = arg2;
    tmp_data2.func = func;
    Py_INCREF(tmp_data2.func);
    arg5 = &tmp_data2;
  }
  res6 = SWIG_ConvertPtr(obj2, &argp6, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_max_abs" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  if (!argp6) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_max_abs" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  arg6 = reinterpret_cast< meep::volume * >(argp6);
  {
    try {
      result = (double)(arg1)->max_abs(arg2,(meep::component const *)arg3,arg4,arg5,(meep::volume const &)*arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  {
    delete[] arg3;
    Py_XDECREF(tmp_data2.func);
  }
  return resultobj;
fail:
  {
    delete[] arg3;
    Py_XDECREF(tmp_data2.func);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_max_abs__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  int arg2 ;
  meep::component *arg3 = (meep::component *) 0 ;
  meep::field_rfunction arg4 = (meep::field_rfunction) 0 ;
  void *arg5 = (void *) 0 ;
  meep::volume *arg6 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res5 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_max_abs", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_max_abs" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_max_abs" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__component, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_max_abs" "', argument " "3"" of type '" "meep::component const *""'"); 
  }
  arg3 = reinterpret_cast< meep::component * >(argp3);
  {
    int res = SWIG_ConvertFunctionPtr(obj3, (void**)(&arg4), SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "fields_max_abs" "', argument " "4"" of type '" "meep::field_rfunction""'"); 
    }
  }
  res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_max_abs" "', argument " "5"" of type '" "void *""'"); 
  }
  res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_max_abs" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  if (!argp6) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_max_abs" "', argument " "6"" of type '" "meep::volume const &""'"); 
  }
  arg6 = reinterpret_cast< meep::volume * >(argp6);
  {
    try {
      result = (double)(arg1)->max_abs(arg2,(meep::component const *)arg3,arg4,arg5,(meep::volume const &)*arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_max_abs__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  int arg2 ;
  meep::volume *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_max_abs", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_max_abs" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_max_abs" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_max_abs" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_max_abs" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    try {
      result = (double)(arg1)->max_abs(arg2,(meep::volume const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_max_abs__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_max_abs", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_max_abs" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_max_abs" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_max_abs" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    try {
      result = (double)(arg1)->max_abs(arg2,(meep::volume const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_max_abs__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::derived_component arg2 ;
  meep::volume *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_max_abs", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_max_abs" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::derived_component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_max_abs" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_max_abs" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    try {
      result = (double)(arg1)->max_abs(arg2,(meep::volume const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_max_abs(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[7] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySequence_Check(argv[1]) &&
        PySequence_Check(PyList_GetItem(argv[1], 0)) &&
        PyCallable_Check(PyList_GetItem(argv[1], 1));
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_fields_max_abs__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_fields_max_abs__SWIG_3(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) >= 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_fields_max_abs__SWIG_4(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_fields_max_abs__SWIG_2(self, args);
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          _v = PyList_Check(argv[2]);
        }
        if (_v) {
          void *ptr = 0;
          int res = SWIG_ConvertFunctionPtr(argv[3], &ptr, SWIGTYPE_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &ptr, 0, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              int res = SWIG_ConvertPtr(argv[5], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                return _wrap_fields_max_abs__SWIG_1(self, args);
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_max_abs'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::max_abs(int,meep::component const *,meep::field_function,void *,meep::volume const &)\n"
    "    meep::fields::max_abs(int,meep::component const *,meep::field_rfunction,void *,meep::volume const &)\n"
    "    meep::fields::max_abs(int,meep::volume const &)\n"
    "    meep::fields::max_abs(meep::component,meep::volume const &)\n"
    "    meep::fields::max_abs(meep::derived_component,meep::volume const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  bool arg7 ;
  std::complex< double > arg8 ;
  meep::dft_chunk *arg9 = (meep::dft_chunk *) 0 ;
  bool arg10 ;
  std::complex< double > arg11 ;
  bool arg12 ;
  int arg13 ;
  int arg14 ;
  bool arg15 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  std::complex< double > val8 ;
  int ecode8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  bool val10 ;
  int ecode10 = 0 ;
  std::complex< double > val11 ;
  int ecode11 = 0 ;
  bool val12 ;
  int ecode12 = 0 ;
  int val13 ;
  int ecode13 = 0 ;
  int val14 ;
  int ecode14 = 0 ;
  bool val15 ;
  int ecode15 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  PyObject * obj14 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 15, 15, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13, &obj14)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  ecode8 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_dft" "', argument " "8"" of type '" "std::complex< double >""'");
  } 
  arg8 = static_cast< std::complex< double > >(val8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_add_dft" "', argument " "9"" of type '" "meep::dft_chunk *""'"); 
  }
  arg9 = reinterpret_cast< meep::dft_chunk * >(argp9);
  ecode10 = SWIG_AsVal_bool(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_add_dft" "', argument " "10"" of type '" "bool""'");
  } 
  arg10 = static_cast< bool >(val10);
  ecode11 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fields_add_dft" "', argument " "11"" of type '" "std::complex< double >""'");
  } 
  arg11 = static_cast< std::complex< double > >(val11);
  ecode12 = SWIG_AsVal_bool(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "fields_add_dft" "', argument " "12"" of type '" "bool""'");
  } 
  arg12 = static_cast< bool >(val12);
  ecode13 = SWIG_AsVal_int(obj12, &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "fields_add_dft" "', argument " "13"" of type '" "int""'");
  } 
  arg13 = static_cast< int >(val13);
  ecode14 = SWIG_AsVal_int(obj13, &val14);
  if (!SWIG_IsOK(ecode14)) {
    SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "fields_add_dft" "', argument " "14"" of type '" "int""'");
  } 
  arg14 = static_cast< int >(val14);
  ecode15 = SWIG_AsVal_bool(obj14, &val15);
  if (!SWIG_IsOK(ecode15)) {
    SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "fields_add_dft" "', argument " "15"" of type '" "bool""'");
  } 
  arg15 = static_cast< bool >(val15);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  bool arg7 ;
  std::complex< double > arg8 ;
  meep::dft_chunk *arg9 = (meep::dft_chunk *) 0 ;
  bool arg10 ;
  std::complex< double > arg11 ;
  bool arg12 ;
  int arg13 ;
  int arg14 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  std::complex< double > val8 ;
  int ecode8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  bool val10 ;
  int ecode10 = 0 ;
  std::complex< double > val11 ;
  int ecode11 = 0 ;
  bool val12 ;
  int ecode12 = 0 ;
  int val13 ;
  int ecode13 = 0 ;
  int val14 ;
  int ecode14 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 14, 14, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  ecode8 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_dft" "', argument " "8"" of type '" "std::complex< double >""'");
  } 
  arg8 = static_cast< std::complex< double > >(val8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_add_dft" "', argument " "9"" of type '" "meep::dft_chunk *""'"); 
  }
  arg9 = reinterpret_cast< meep::dft_chunk * >(argp9);
  ecode10 = SWIG_AsVal_bool(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_add_dft" "', argument " "10"" of type '" "bool""'");
  } 
  arg10 = static_cast< bool >(val10);
  ecode11 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fields_add_dft" "', argument " "11"" of type '" "std::complex< double >""'");
  } 
  arg11 = static_cast< std::complex< double > >(val11);
  ecode12 = SWIG_AsVal_bool(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "fields_add_dft" "', argument " "12"" of type '" "bool""'");
  } 
  arg12 = static_cast< bool >(val12);
  ecode13 = SWIG_AsVal_int(obj12, &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "fields_add_dft" "', argument " "13"" of type '" "int""'");
  } 
  arg13 = static_cast< int >(val13);
  ecode14 = SWIG_AsVal_int(obj13, &val14);
  if (!SWIG_IsOK(ecode14)) {
    SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "fields_add_dft" "', argument " "14"" of type '" "int""'");
  } 
  arg14 = static_cast< int >(val14);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  bool arg7 ;
  std::complex< double > arg8 ;
  meep::dft_chunk *arg9 = (meep::dft_chunk *) 0 ;
  bool arg10 ;
  std::complex< double > arg11 ;
  bool arg12 ;
  int arg13 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  std::complex< double > val8 ;
  int ecode8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  bool val10 ;
  int ecode10 = 0 ;
  std::complex< double > val11 ;
  int ecode11 = 0 ;
  bool val12 ;
  int ecode12 = 0 ;
  int val13 ;
  int ecode13 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 13, 13, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  ecode8 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_dft" "', argument " "8"" of type '" "std::complex< double >""'");
  } 
  arg8 = static_cast< std::complex< double > >(val8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_add_dft" "', argument " "9"" of type '" "meep::dft_chunk *""'"); 
  }
  arg9 = reinterpret_cast< meep::dft_chunk * >(argp9);
  ecode10 = SWIG_AsVal_bool(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_add_dft" "', argument " "10"" of type '" "bool""'");
  } 
  arg10 = static_cast< bool >(val10);
  ecode11 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fields_add_dft" "', argument " "11"" of type '" "std::complex< double >""'");
  } 
  arg11 = static_cast< std::complex< double > >(val11);
  ecode12 = SWIG_AsVal_bool(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "fields_add_dft" "', argument " "12"" of type '" "bool""'");
  } 
  arg12 = static_cast< bool >(val12);
  ecode13 = SWIG_AsVal_int(obj12, &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "fields_add_dft" "', argument " "13"" of type '" "int""'");
  } 
  arg13 = static_cast< int >(val13);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  bool arg7 ;
  std::complex< double > arg8 ;
  meep::dft_chunk *arg9 = (meep::dft_chunk *) 0 ;
  bool arg10 ;
  std::complex< double > arg11 ;
  bool arg12 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  std::complex< double > val8 ;
  int ecode8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  bool val10 ;
  int ecode10 = 0 ;
  std::complex< double > val11 ;
  int ecode11 = 0 ;
  bool val12 ;
  int ecode12 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 12, 12, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  ecode8 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_dft" "', argument " "8"" of type '" "std::complex< double >""'");
  } 
  arg8 = static_cast< std::complex< double > >(val8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_add_dft" "', argument " "9"" of type '" "meep::dft_chunk *""'"); 
  }
  arg9 = reinterpret_cast< meep::dft_chunk * >(argp9);
  ecode10 = SWIG_AsVal_bool(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_add_dft" "', argument " "10"" of type '" "bool""'");
  } 
  arg10 = static_cast< bool >(val10);
  ecode11 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fields_add_dft" "', argument " "11"" of type '" "std::complex< double >""'");
  } 
  arg11 = static_cast< std::complex< double > >(val11);
  ecode12 = SWIG_AsVal_bool(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "fields_add_dft" "', argument " "12"" of type '" "bool""'");
  } 
  arg12 = static_cast< bool >(val12);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  bool arg7 ;
  std::complex< double > arg8 ;
  meep::dft_chunk *arg9 = (meep::dft_chunk *) 0 ;
  bool arg10 ;
  std::complex< double > arg11 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  std::complex< double > val8 ;
  int ecode8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  bool val10 ;
  int ecode10 = 0 ;
  std::complex< double > val11 ;
  int ecode11 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 11, 11, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  ecode8 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_dft" "', argument " "8"" of type '" "std::complex< double >""'");
  } 
  arg8 = static_cast< std::complex< double > >(val8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_add_dft" "', argument " "9"" of type '" "meep::dft_chunk *""'"); 
  }
  arg9 = reinterpret_cast< meep::dft_chunk * >(argp9);
  ecode10 = SWIG_AsVal_bool(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_add_dft" "', argument " "10"" of type '" "bool""'");
  } 
  arg10 = static_cast< bool >(val10);
  ecode11 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fields_add_dft" "', argument " "11"" of type '" "std::complex< double >""'");
  } 
  arg11 = static_cast< std::complex< double > >(val11);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  bool arg7 ;
  std::complex< double > arg8 ;
  meep::dft_chunk *arg9 = (meep::dft_chunk *) 0 ;
  bool arg10 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  std::complex< double > val8 ;
  int ecode8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  bool val10 ;
  int ecode10 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 10, 10, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  ecode8 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_dft" "', argument " "8"" of type '" "std::complex< double >""'");
  } 
  arg8 = static_cast< std::complex< double > >(val8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_add_dft" "', argument " "9"" of type '" "meep::dft_chunk *""'"); 
  }
  arg9 = reinterpret_cast< meep::dft_chunk * >(argp9);
  ecode10 = SWIG_AsVal_bool(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_add_dft" "', argument " "10"" of type '" "bool""'");
  } 
  arg10 = static_cast< bool >(val10);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  bool arg7 ;
  std::complex< double > arg8 ;
  meep::dft_chunk *arg9 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  std::complex< double > val8 ;
  int ecode8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 9, 9, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  ecode8 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_dft" "', argument " "8"" of type '" "std::complex< double >""'");
  } 
  arg8 = static_cast< std::complex< double > >(val8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_add_dft" "', argument " "9"" of type '" "meep::dft_chunk *""'"); 
  }
  arg9 = reinterpret_cast< meep::dft_chunk * >(argp9);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  bool arg7 ;
  std::complex< double > arg8 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  std::complex< double > val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  ecode8 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_dft" "', argument " "8"" of type '" "std::complex< double >""'");
  } 
  arg8 = static_cast< std::complex< double > >(val8);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  bool arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_9(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_10(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  double *arg4 = (double *) 0 ;
  size_t arg5 ;
  bool arg6 ;
  std::complex< double > arg7 ;
  meep::dft_chunk *arg8 = (meep::dft_chunk *) 0 ;
  bool arg9 ;
  std::complex< double > arg10 ;
  bool arg11 ;
  int arg12 ;
  int arg13 ;
  bool arg14 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  size_t val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  std::complex< double > val7 ;
  int ecode7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  bool val9 ;
  int ecode9 = 0 ;
  std::complex< double > val10 ;
  int ecode10 = 0 ;
  bool val11 ;
  int ecode11 = 0 ;
  int val12 ;
  int ecode12 = 0 ;
  int val13 ;
  int ecode13 = 0 ;
  bool val14 ;
  int ecode14 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 14, 14, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "double const *""'"); 
  }
  arg4 = reinterpret_cast< double * >(argp4);
  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "size_t""'");
  } 
  arg5 = static_cast< size_t >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  ecode7 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft" "', argument " "7"" of type '" "std::complex< double >""'");
  } 
  arg7 = static_cast< std::complex< double > >(val7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_add_dft" "', argument " "8"" of type '" "meep::dft_chunk *""'"); 
  }
  arg8 = reinterpret_cast< meep::dft_chunk * >(argp8);
  ecode9 = SWIG_AsVal_bool(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_add_dft" "', argument " "9"" of type '" "bool""'");
  } 
  arg9 = static_cast< bool >(val9);
  ecode10 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_add_dft" "', argument " "10"" of type '" "std::complex< double >""'");
  } 
  arg10 = static_cast< std::complex< double > >(val10);
  ecode11 = SWIG_AsVal_bool(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fields_add_dft" "', argument " "11"" of type '" "bool""'");
  } 
  arg11 = static_cast< bool >(val11);
  ecode12 = SWIG_AsVal_int(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "fields_add_dft" "', argument " "12"" of type '" "int""'");
  } 
  arg12 = static_cast< int >(val12);
  ecode13 = SWIG_AsVal_int(obj12, &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "fields_add_dft" "', argument " "13"" of type '" "int""'");
  } 
  arg13 = static_cast< int >(val13);
  ecode14 = SWIG_AsVal_bool(obj13, &val14);
  if (!SWIG_IsOK(ecode14)) {
    SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "fields_add_dft" "', argument " "14"" of type '" "bool""'");
  } 
  arg14 = static_cast< bool >(val14);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,(double const *)arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_11(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  double *arg4 = (double *) 0 ;
  size_t arg5 ;
  bool arg6 ;
  std::complex< double > arg7 ;
  meep::dft_chunk *arg8 = (meep::dft_chunk *) 0 ;
  bool arg9 ;
  std::complex< double > arg10 ;
  bool arg11 ;
  int arg12 ;
  int arg13 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  size_t val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  std::complex< double > val7 ;
  int ecode7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  bool val9 ;
  int ecode9 = 0 ;
  std::complex< double > val10 ;
  int ecode10 = 0 ;
  bool val11 ;
  int ecode11 = 0 ;
  int val12 ;
  int ecode12 = 0 ;
  int val13 ;
  int ecode13 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 13, 13, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "double const *""'"); 
  }
  arg4 = reinterpret_cast< double * >(argp4);
  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "size_t""'");
  } 
  arg5 = static_cast< size_t >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  ecode7 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft" "', argument " "7"" of type '" "std::complex< double >""'");
  } 
  arg7 = static_cast< std::complex< double > >(val7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_add_dft" "', argument " "8"" of type '" "meep::dft_chunk *""'"); 
  }
  arg8 = reinterpret_cast< meep::dft_chunk * >(argp8);
  ecode9 = SWIG_AsVal_bool(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_add_dft" "', argument " "9"" of type '" "bool""'");
  } 
  arg9 = static_cast< bool >(val9);
  ecode10 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_add_dft" "', argument " "10"" of type '" "std::complex< double >""'");
  } 
  arg10 = static_cast< std::complex< double > >(val10);
  ecode11 = SWIG_AsVal_bool(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fields_add_dft" "', argument " "11"" of type '" "bool""'");
  } 
  arg11 = static_cast< bool >(val11);
  ecode12 = SWIG_AsVal_int(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "fields_add_dft" "', argument " "12"" of type '" "int""'");
  } 
  arg12 = static_cast< int >(val12);
  ecode13 = SWIG_AsVal_int(obj12, &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "fields_add_dft" "', argument " "13"" of type '" "int""'");
  } 
  arg13 = static_cast< int >(val13);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,(double const *)arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_12(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  double *arg4 = (double *) 0 ;
  size_t arg5 ;
  bool arg6 ;
  std::complex< double > arg7 ;
  meep::dft_chunk *arg8 = (meep::dft_chunk *) 0 ;
  bool arg9 ;
  std::complex< double > arg10 ;
  bool arg11 ;
  int arg12 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  size_t val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  std::complex< double > val7 ;
  int ecode7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  bool val9 ;
  int ecode9 = 0 ;
  std::complex< double > val10 ;
  int ecode10 = 0 ;
  bool val11 ;
  int ecode11 = 0 ;
  int val12 ;
  int ecode12 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 12, 12, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "double const *""'"); 
  }
  arg4 = reinterpret_cast< double * >(argp4);
  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "size_t""'");
  } 
  arg5 = static_cast< size_t >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  ecode7 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft" "', argument " "7"" of type '" "std::complex< double >""'");
  } 
  arg7 = static_cast< std::complex< double > >(val7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_add_dft" "', argument " "8"" of type '" "meep::dft_chunk *""'"); 
  }
  arg8 = reinterpret_cast< meep::dft_chunk * >(argp8);
  ecode9 = SWIG_AsVal_bool(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_add_dft" "', argument " "9"" of type '" "bool""'");
  } 
  arg9 = static_cast< bool >(val9);
  ecode10 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_add_dft" "', argument " "10"" of type '" "std::complex< double >""'");
  } 
  arg10 = static_cast< std::complex< double > >(val10);
  ecode11 = SWIG_AsVal_bool(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fields_add_dft" "', argument " "11"" of type '" "bool""'");
  } 
  arg11 = static_cast< bool >(val11);
  ecode12 = SWIG_AsVal_int(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "fields_add_dft" "', argument " "12"" of type '" "int""'");
  } 
  arg12 = static_cast< int >(val12);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,(double const *)arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_13(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  double *arg4 = (double *) 0 ;
  size_t arg5 ;
  bool arg6 ;
  std::complex< double > arg7 ;
  meep::dft_chunk *arg8 = (meep::dft_chunk *) 0 ;
  bool arg9 ;
  std::complex< double > arg10 ;
  bool arg11 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  size_t val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  std::complex< double > val7 ;
  int ecode7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  bool val9 ;
  int ecode9 = 0 ;
  std::complex< double > val10 ;
  int ecode10 = 0 ;
  bool val11 ;
  int ecode11 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 11, 11, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "double const *""'"); 
  }
  arg4 = reinterpret_cast< double * >(argp4);
  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "size_t""'");
  } 
  arg5 = static_cast< size_t >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  ecode7 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft" "', argument " "7"" of type '" "std::complex< double >""'");
  } 
  arg7 = static_cast< std::complex< double > >(val7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_add_dft" "', argument " "8"" of type '" "meep::dft_chunk *""'"); 
  }
  arg8 = reinterpret_cast< meep::dft_chunk * >(argp8);
  ecode9 = SWIG_AsVal_bool(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_add_dft" "', argument " "9"" of type '" "bool""'");
  } 
  arg9 = static_cast< bool >(val9);
  ecode10 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_add_dft" "', argument " "10"" of type '" "std::complex< double >""'");
  } 
  arg10 = static_cast< std::complex< double > >(val10);
  ecode11 = SWIG_AsVal_bool(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fields_add_dft" "', argument " "11"" of type '" "bool""'");
  } 
  arg11 = static_cast< bool >(val11);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,(double const *)arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_14(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  double *arg4 = (double *) 0 ;
  size_t arg5 ;
  bool arg6 ;
  std::complex< double > arg7 ;
  meep::dft_chunk *arg8 = (meep::dft_chunk *) 0 ;
  bool arg9 ;
  std::complex< double > arg10 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  size_t val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  std::complex< double > val7 ;
  int ecode7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  bool val9 ;
  int ecode9 = 0 ;
  std::complex< double > val10 ;
  int ecode10 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 10, 10, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "double const *""'"); 
  }
  arg4 = reinterpret_cast< double * >(argp4);
  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "size_t""'");
  } 
  arg5 = static_cast< size_t >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  ecode7 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft" "', argument " "7"" of type '" "std::complex< double >""'");
  } 
  arg7 = static_cast< std::complex< double > >(val7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_add_dft" "', argument " "8"" of type '" "meep::dft_chunk *""'"); 
  }
  arg8 = reinterpret_cast< meep::dft_chunk * >(argp8);
  ecode9 = SWIG_AsVal_bool(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_add_dft" "', argument " "9"" of type '" "bool""'");
  } 
  arg9 = static_cast< bool >(val9);
  ecode10 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_add_dft" "', argument " "10"" of type '" "std::complex< double >""'");
  } 
  arg10 = static_cast< std::complex< double > >(val10);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,(double const *)arg4,arg5,arg6,arg7,arg8,arg9,arg10);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_15(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  double *arg4 = (double *) 0 ;
  size_t arg5 ;
  bool arg6 ;
  std::complex< double > arg7 ;
  meep::dft_chunk *arg8 = (meep::dft_chunk *) 0 ;
  bool arg9 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  size_t val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  std::complex< double > val7 ;
  int ecode7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  bool val9 ;
  int ecode9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 9, 9, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "double const *""'"); 
  }
  arg4 = reinterpret_cast< double * >(argp4);
  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "size_t""'");
  } 
  arg5 = static_cast< size_t >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  ecode7 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft" "', argument " "7"" of type '" "std::complex< double >""'");
  } 
  arg7 = static_cast< std::complex< double > >(val7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_add_dft" "', argument " "8"" of type '" "meep::dft_chunk *""'"); 
  }
  arg8 = reinterpret_cast< meep::dft_chunk * >(argp8);
  ecode9 = SWIG_AsVal_bool(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_add_dft" "', argument " "9"" of type '" "bool""'");
  } 
  arg9 = static_cast< bool >(val9);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,(double const *)arg4,arg5,arg6,arg7,arg8,arg9);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_16(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  double *arg4 = (double *) 0 ;
  size_t arg5 ;
  bool arg6 ;
  std::complex< double > arg7 ;
  meep::dft_chunk *arg8 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  size_t val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  std::complex< double > val7 ;
  int ecode7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "double const *""'"); 
  }
  arg4 = reinterpret_cast< double * >(argp4);
  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "size_t""'");
  } 
  arg5 = static_cast< size_t >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  ecode7 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft" "', argument " "7"" of type '" "std::complex< double >""'");
  } 
  arg7 = static_cast< std::complex< double > >(val7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_add_dft" "', argument " "8"" of type '" "meep::dft_chunk *""'"); 
  }
  arg8 = reinterpret_cast< meep::dft_chunk * >(argp8);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,(double const *)arg4,arg5,arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_17(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  double *arg4 = (double *) 0 ;
  size_t arg5 ;
  bool arg6 ;
  std::complex< double > arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  size_t val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  std::complex< double > val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "double const *""'"); 
  }
  arg4 = reinterpret_cast< double * >(argp4);
  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "size_t""'");
  } 
  arg5 = static_cast< size_t >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  ecode7 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft" "', argument " "7"" of type '" "std::complex< double >""'");
  } 
  arg7 = static_cast< std::complex< double > >(val7);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,(double const *)arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_18(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  double *arg4 = (double *) 0 ;
  size_t arg5 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  size_t val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "double const *""'"); 
  }
  arg4 = reinterpret_cast< double * >(argp4);
  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "size_t""'");
  } 
  arg5 = static_cast< size_t >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,(double const *)arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_19(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  double *arg4 = (double *) 0 ;
  size_t arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  size_t val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "double const *""'"); 
  }
  arg4 = reinterpret_cast< double * >(argp4);
  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "size_t""'");
  } 
  arg5 = static_cast< size_t >(val5);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,(double const *)arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_20(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  std::vector< double,std::allocator< double > > *arg4 = 0 ;
  bool arg5 ;
  std::complex< double > arg6 ;
  meep::dft_chunk *arg7 = (meep::dft_chunk *) 0 ;
  bool arg8 ;
  std::complex< double > arg9 ;
  bool arg10 ;
  int arg11 ;
  int arg12 ;
  bool arg13 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  bool val5 ;
  int ecode5 = 0 ;
  std::complex< double > val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  bool val8 ;
  int ecode8 = 0 ;
  std::complex< double > val9 ;
  int ecode9 = 0 ;
  bool val10 ;
  int ecode10 = 0 ;
  int val11 ;
  int ecode11 = 0 ;
  int val12 ;
  int ecode12 = 0 ;
  bool val13 ;
  int ecode13 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 13, 13, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg4 = ptr;
  }
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "std::complex< double >""'");
  } 
  arg6 = static_cast< std::complex< double > >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_add_dft" "', argument " "7"" of type '" "meep::dft_chunk *""'"); 
  }
  arg7 = reinterpret_cast< meep::dft_chunk * >(argp7);
  ecode8 = SWIG_AsVal_bool(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_dft" "', argument " "8"" of type '" "bool""'");
  } 
  arg8 = static_cast< bool >(val8);
  ecode9 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_add_dft" "', argument " "9"" of type '" "std::complex< double >""'");
  } 
  arg9 = static_cast< std::complex< double > >(val9);
  ecode10 = SWIG_AsVal_bool(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_add_dft" "', argument " "10"" of type '" "bool""'");
  } 
  arg10 = static_cast< bool >(val10);
  ecode11 = SWIG_AsVal_int(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fields_add_dft" "', argument " "11"" of type '" "int""'");
  } 
  arg11 = static_cast< int >(val11);
  ecode12 = SWIG_AsVal_int(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "fields_add_dft" "', argument " "12"" of type '" "int""'");
  } 
  arg12 = static_cast< int >(val12);
  ecode13 = SWIG_AsVal_bool(obj12, &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "fields_add_dft" "', argument " "13"" of type '" "bool""'");
  } 
  arg13 = static_cast< bool >(val13);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,(std::vector< double,std::allocator< double > > const &)*arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_21(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  std::vector< double,std::allocator< double > > *arg4 = 0 ;
  bool arg5 ;
  std::complex< double > arg6 ;
  meep::dft_chunk *arg7 = (meep::dft_chunk *) 0 ;
  bool arg8 ;
  std::complex< double > arg9 ;
  bool arg10 ;
  int arg11 ;
  int arg12 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  bool val5 ;
  int ecode5 = 0 ;
  std::complex< double > val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  bool val8 ;
  int ecode8 = 0 ;
  std::complex< double > val9 ;
  int ecode9 = 0 ;
  bool val10 ;
  int ecode10 = 0 ;
  int val11 ;
  int ecode11 = 0 ;
  int val12 ;
  int ecode12 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 12, 12, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg4 = ptr;
  }
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "std::complex< double >""'");
  } 
  arg6 = static_cast< std::complex< double > >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_add_dft" "', argument " "7"" of type '" "meep::dft_chunk *""'"); 
  }
  arg7 = reinterpret_cast< meep::dft_chunk * >(argp7);
  ecode8 = SWIG_AsVal_bool(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_dft" "', argument " "8"" of type '" "bool""'");
  } 
  arg8 = static_cast< bool >(val8);
  ecode9 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_add_dft" "', argument " "9"" of type '" "std::complex< double >""'");
  } 
  arg9 = static_cast< std::complex< double > >(val9);
  ecode10 = SWIG_AsVal_bool(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_add_dft" "', argument " "10"" of type '" "bool""'");
  } 
  arg10 = static_cast< bool >(val10);
  ecode11 = SWIG_AsVal_int(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fields_add_dft" "', argument " "11"" of type '" "int""'");
  } 
  arg11 = static_cast< int >(val11);
  ecode12 = SWIG_AsVal_int(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "fields_add_dft" "', argument " "12"" of type '" "int""'");
  } 
  arg12 = static_cast< int >(val12);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,(std::vector< double,std::allocator< double > > const &)*arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_22(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  std::vector< double,std::allocator< double > > *arg4 = 0 ;
  bool arg5 ;
  std::complex< double > arg6 ;
  meep::dft_chunk *arg7 = (meep::dft_chunk *) 0 ;
  bool arg8 ;
  std::complex< double > arg9 ;
  bool arg10 ;
  int arg11 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  bool val5 ;
  int ecode5 = 0 ;
  std::complex< double > val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  bool val8 ;
  int ecode8 = 0 ;
  std::complex< double > val9 ;
  int ecode9 = 0 ;
  bool val10 ;
  int ecode10 = 0 ;
  int val11 ;
  int ecode11 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 11, 11, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg4 = ptr;
  }
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "std::complex< double >""'");
  } 
  arg6 = static_cast< std::complex< double > >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_add_dft" "', argument " "7"" of type '" "meep::dft_chunk *""'"); 
  }
  arg7 = reinterpret_cast< meep::dft_chunk * >(argp7);
  ecode8 = SWIG_AsVal_bool(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_dft" "', argument " "8"" of type '" "bool""'");
  } 
  arg8 = static_cast< bool >(val8);
  ecode9 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_add_dft" "', argument " "9"" of type '" "std::complex< double >""'");
  } 
  arg9 = static_cast< std::complex< double > >(val9);
  ecode10 = SWIG_AsVal_bool(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_add_dft" "', argument " "10"" of type '" "bool""'");
  } 
  arg10 = static_cast< bool >(val10);
  ecode11 = SWIG_AsVal_int(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fields_add_dft" "', argument " "11"" of type '" "int""'");
  } 
  arg11 = static_cast< int >(val11);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,(std::vector< double,std::allocator< double > > const &)*arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_23(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  std::vector< double,std::allocator< double > > *arg4 = 0 ;
  bool arg5 ;
  std::complex< double > arg6 ;
  meep::dft_chunk *arg7 = (meep::dft_chunk *) 0 ;
  bool arg8 ;
  std::complex< double > arg9 ;
  bool arg10 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  bool val5 ;
  int ecode5 = 0 ;
  std::complex< double > val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  bool val8 ;
  int ecode8 = 0 ;
  std::complex< double > val9 ;
  int ecode9 = 0 ;
  bool val10 ;
  int ecode10 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 10, 10, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg4 = ptr;
  }
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "std::complex< double >""'");
  } 
  arg6 = static_cast< std::complex< double > >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_add_dft" "', argument " "7"" of type '" "meep::dft_chunk *""'"); 
  }
  arg7 = reinterpret_cast< meep::dft_chunk * >(argp7);
  ecode8 = SWIG_AsVal_bool(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_dft" "', argument " "8"" of type '" "bool""'");
  } 
  arg8 = static_cast< bool >(val8);
  ecode9 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_add_dft" "', argument " "9"" of type '" "std::complex< double >""'");
  } 
  arg9 = static_cast< std::complex< double > >(val9);
  ecode10 = SWIG_AsVal_bool(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_add_dft" "', argument " "10"" of type '" "bool""'");
  } 
  arg10 = static_cast< bool >(val10);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,(std::vector< double,std::allocator< double > > const &)*arg4,arg5,arg6,arg7,arg8,arg9,arg10);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_24(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  std::vector< double,std::allocator< double > > *arg4 = 0 ;
  bool arg5 ;
  std::complex< double > arg6 ;
  meep::dft_chunk *arg7 = (meep::dft_chunk *) 0 ;
  bool arg8 ;
  std::complex< double > arg9 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  bool val5 ;
  int ecode5 = 0 ;
  std::complex< double > val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  bool val8 ;
  int ecode8 = 0 ;
  std::complex< double > val9 ;
  int ecode9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 9, 9, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg4 = ptr;
  }
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "std::complex< double >""'");
  } 
  arg6 = static_cast< std::complex< double > >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_add_dft" "', argument " "7"" of type '" "meep::dft_chunk *""'"); 
  }
  arg7 = reinterpret_cast< meep::dft_chunk * >(argp7);
  ecode8 = SWIG_AsVal_bool(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_dft" "', argument " "8"" of type '" "bool""'");
  } 
  arg8 = static_cast< bool >(val8);
  ecode9 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_add_dft" "', argument " "9"" of type '" "std::complex< double >""'");
  } 
  arg9 = static_cast< std::complex< double > >(val9);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,(std::vector< double,std::allocator< double > > const &)*arg4,arg5,arg6,arg7,arg8,arg9);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_25(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  std::vector< double,std::allocator< double > > *arg4 = 0 ;
  bool arg5 ;
  std::complex< double > arg6 ;
  meep::dft_chunk *arg7 = (meep::dft_chunk *) 0 ;
  bool arg8 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  bool val5 ;
  int ecode5 = 0 ;
  std::complex< double > val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  bool val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg4 = ptr;
  }
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "std::complex< double >""'");
  } 
  arg6 = static_cast< std::complex< double > >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_add_dft" "', argument " "7"" of type '" "meep::dft_chunk *""'"); 
  }
  arg7 = reinterpret_cast< meep::dft_chunk * >(argp7);
  ecode8 = SWIG_AsVal_bool(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_dft" "', argument " "8"" of type '" "bool""'");
  } 
  arg8 = static_cast< bool >(val8);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,(std::vector< double,std::allocator< double > > const &)*arg4,arg5,arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_26(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  std::vector< double,std::allocator< double > > *arg4 = 0 ;
  bool arg5 ;
  std::complex< double > arg6 ;
  meep::dft_chunk *arg7 = (meep::dft_chunk *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  bool val5 ;
  int ecode5 = 0 ;
  std::complex< double > val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg4 = ptr;
  }
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "std::complex< double >""'");
  } 
  arg6 = static_cast< std::complex< double > >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_add_dft" "', argument " "7"" of type '" "meep::dft_chunk *""'"); 
  }
  arg7 = reinterpret_cast< meep::dft_chunk * >(argp7);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,(std::vector< double,std::allocator< double > > const &)*arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_27(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  std::vector< double,std::allocator< double > > *arg4 = 0 ;
  bool arg5 ;
  std::complex< double > arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  bool val5 ;
  int ecode5 = 0 ;
  std::complex< double > val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg4 = ptr;
  }
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "std::complex< double >""'");
  } 
  arg6 = static_cast< std::complex< double > >(val6);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,(std::vector< double,std::allocator< double > > const &)*arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_28(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  std::vector< double,std::allocator< double > > *arg4 = 0 ;
  bool arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  bool val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg4 = ptr;
  }
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,(std::vector< double,std::allocator< double > > const &)*arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_29(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  std::vector< double,std::allocator< double > > *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg4 = ptr;
  }
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft(arg2,(meep::volume const &)*arg3,(std::vector< double,std::allocator< double > > const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_pt__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::vec *arg3 = 0 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_pt", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_pt" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_pt" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_pt" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_pt" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_pt" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_pt" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft_pt(arg2,(meep::vec const &)*arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_pt__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::vec *arg3 = 0 ;
  std::vector< double,std::allocator< double > > *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_pt", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_pt" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_pt" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_pt" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft_pt" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_pt" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg4 = ptr;
  }
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft_pt(arg2,(meep::vec const &)*arg3,(std::vector< double,std::allocator< double > > const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_pt(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[7] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_fields_add_dft_pt__SWIG_1(self, args);
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_add_dft_pt__SWIG_0(self, args);
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_add_dft_pt'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::add_dft_pt(meep::component,meep::vec const &,double,double,int)\n"
    "    meep::fields::add_dft_pt(meep::component,meep::vec const &,std::vector< double,std::allocator< double > > const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_30(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  double arg3 ;
  double arg4 ;
  int arg5 ;
  bool arg6 ;
  bool arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft((meep::volume_list const *)arg2,arg3,arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_31(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  double arg3 ;
  double arg4 ;
  int arg5 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft((meep::volume_list const *)arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_32(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  double arg3 ;
  double arg4 ;
  int arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft((meep::volume_list const *)arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_33(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  std::vector< double,std::allocator< double > > *arg3 = 0 ;
  bool arg4 ;
  bool arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  bool val4 ;
  int ecode4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg3 = ptr;
  }
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft((meep::volume_list const *)arg2,(std::vector< double,std::allocator< double > > const &)*arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_34(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  std::vector< double,std::allocator< double > > *arg3 = 0 ;
  bool arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  bool val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg3 = ptr;
  }
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft((meep::volume_list const *)arg2,(std::vector< double,std::allocator< double > > const &)*arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft__SWIG_35(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  std::vector< double,std::allocator< double > > *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::dft_chunk *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      result = (meep::dft_chunk *)(arg1)->add_dft((meep::volume_list const *)arg2,(std::vector< double,std::allocator< double > > const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__dft_chunk, 0 |  0 );
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[16] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 15) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< double,std::allocator< double > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_fields_add_dft__SWIG_35(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< double,std::allocator< double > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_fields_add_dft__SWIG_34(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_fields_add_dft__SWIG_29(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_add_dft__SWIG_32(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< double,std::allocator< double > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_add_dft__SWIG_33(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_size_t(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_add_dft__SWIG_19(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_add_dft__SWIG_28(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_size_t(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_add_dft__SWIG_18(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_add_dft__SWIG_9(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_add_dft__SWIG_27(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_add_dft__SWIG_31(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_size_t(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_fields_add_dft__SWIG_17(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_fields_add_dft__SWIG_8(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_fields_add_dft__SWIG_30(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  return _wrap_fields_add_dft__SWIG_26(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_size_t(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    return _wrap_fields_add_dft__SWIG_16(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    return _wrap_fields_add_dft__SWIG_7(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  {
                    int res = SWIG_AsVal_bool(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    return _wrap_fields_add_dft__SWIG_25(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 9) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_size_t(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    {
                      int res = SWIG_AsVal_bool(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      return _wrap_fields_add_dft__SWIG_15(self, args);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 9) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      return _wrap_fields_add_dft__SWIG_6(self, args);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 9) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  {
                    int res = SWIG_AsVal_bool(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    {
                      int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      return _wrap_fields_add_dft__SWIG_24(self, args);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 10) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_size_t(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    {
                      int res = SWIG_AsVal_bool(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        return _wrap_fields_add_dft__SWIG_14(self, args);
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 10) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      {
                        int res = SWIG_AsVal_bool(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        return _wrap_fields_add_dft__SWIG_5(self, args);
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 10) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  {
                    int res = SWIG_AsVal_bool(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    {
                      int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        int res = SWIG_AsVal_bool(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        return _wrap_fields_add_dft__SWIG_23(self, args);
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 11) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_size_t(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    {
                      int res = SWIG_AsVal_bool(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        {
                          int res = SWIG_AsVal_bool(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          return _wrap_fields_add_dft__SWIG_13(self, args);
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 11) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      {
                        int res = SWIG_AsVal_bool(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        {
                          int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          return _wrap_fields_add_dft__SWIG_4(self, args);
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 11) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  {
                    int res = SWIG_AsVal_bool(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    {
                      int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        int res = SWIG_AsVal_bool(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        {
                          int res = SWIG_AsVal_int(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          return _wrap_fields_add_dft__SWIG_22(self, args);
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 12) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_size_t(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    {
                      int res = SWIG_AsVal_bool(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        {
                          int res = SWIG_AsVal_bool(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          {
                            int res = SWIG_AsVal_int(argv[11], NULL);
                            _v = SWIG_CheckState(res);
                          }
                          if (_v) {
                            return _wrap_fields_add_dft__SWIG_12(self, args);
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 12) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      {
                        int res = SWIG_AsVal_bool(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        {
                          int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          {
                            int res = SWIG_AsVal_bool(argv[11], NULL);
                            _v = SWIG_CheckState(res);
                          }
                          if (_v) {
                            return _wrap_fields_add_dft__SWIG_3(self, args);
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 12) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  {
                    int res = SWIG_AsVal_bool(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    {
                      int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        int res = SWIG_AsVal_bool(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        {
                          int res = SWIG_AsVal_int(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          {
                            int res = SWIG_AsVal_int(argv[11], NULL);
                            _v = SWIG_CheckState(res);
                          }
                          if (_v) {
                            return _wrap_fields_add_dft__SWIG_21(self, args);
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 13) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_size_t(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    {
                      int res = SWIG_AsVal_bool(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        {
                          int res = SWIG_AsVal_bool(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          {
                            int res = SWIG_AsVal_int(argv[11], NULL);
                            _v = SWIG_CheckState(res);
                          }
                          if (_v) {
                            {
                              int res = SWIG_AsVal_int(argv[12], NULL);
                              _v = SWIG_CheckState(res);
                            }
                            if (_v) {
                              return _wrap_fields_add_dft__SWIG_11(self, args);
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 13) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      {
                        int res = SWIG_AsVal_bool(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        {
                          int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          {
                            int res = SWIG_AsVal_bool(argv[11], NULL);
                            _v = SWIG_CheckState(res);
                          }
                          if (_v) {
                            {
                              int res = SWIG_AsVal_int(argv[12], NULL);
                              _v = SWIG_CheckState(res);
                            }
                            if (_v) {
                              return _wrap_fields_add_dft__SWIG_2(self, args);
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 13) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  {
                    int res = SWIG_AsVal_bool(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    {
                      int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        int res = SWIG_AsVal_bool(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        {
                          int res = SWIG_AsVal_int(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          {
                            int res = SWIG_AsVal_int(argv[11], NULL);
                            _v = SWIG_CheckState(res);
                          }
                          if (_v) {
                            {
                              int res = SWIG_AsVal_bool(argv[12], NULL);
                              _v = SWIG_CheckState(res);
                            }
                            if (_v) {
                              return _wrap_fields_add_dft__SWIG_20(self, args);
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 14) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_size_t(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    {
                      int res = SWIG_AsVal_bool(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        {
                          int res = SWIG_AsVal_bool(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          {
                            int res = SWIG_AsVal_int(argv[11], NULL);
                            _v = SWIG_CheckState(res);
                          }
                          if (_v) {
                            {
                              int res = SWIG_AsVal_int(argv[12], NULL);
                              _v = SWIG_CheckState(res);
                            }
                            if (_v) {
                              {
                                int res = SWIG_AsVal_bool(argv[13], NULL);
                                _v = SWIG_CheckState(res);
                              }
                              if (_v) {
                                return _wrap_fields_add_dft__SWIG_10(self, args);
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 14) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      {
                        int res = SWIG_AsVal_bool(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        {
                          int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          {
                            int res = SWIG_AsVal_bool(argv[11], NULL);
                            _v = SWIG_CheckState(res);
                          }
                          if (_v) {
                            {
                              int res = SWIG_AsVal_int(argv[12], NULL);
                              _v = SWIG_CheckState(res);
                            }
                            if (_v) {
                              {
                                int res = SWIG_AsVal_int(argv[13], NULL);
                                _v = SWIG_CheckState(res);
                              }
                              if (_v) {
                                return _wrap_fields_add_dft__SWIG_1(self, args);
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 15) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_meep__dft_chunk, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      {
                        int res = SWIG_AsVal_bool(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        {
                          int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          {
                            int res = SWIG_AsVal_bool(argv[11], NULL);
                            _v = SWIG_CheckState(res);
                          }
                          if (_v) {
                            {
                              int res = SWIG_AsVal_int(argv[12], NULL);
                              _v = SWIG_CheckState(res);
                            }
                            if (_v) {
                              {
                                int res = SWIG_AsVal_int(argv[13], NULL);
                                _v = SWIG_CheckState(res);
                              }
                              if (_v) {
                                {
                                  int res = SWIG_AsVal_bool(argv[14], NULL);
                                  _v = SWIG_CheckState(res);
                                }
                                if (_v) {
                                  return _wrap_fields_add_dft__SWIG_0(self, args);
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_add_dft'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,double,double,int,bool,std::complex< double >,meep::dft_chunk *,bool,std::complex< double >,bool,int,int,bool)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,double,double,int,bool,std::complex< double >,meep::dft_chunk *,bool,std::complex< double >,bool,int,int)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,double,double,int,bool,std::complex< double >,meep::dft_chunk *,bool,std::complex< double >,bool,int)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,double,double,int,bool,std::complex< double >,meep::dft_chunk *,bool,std::complex< double >,bool)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,double,double,int,bool,std::complex< double >,meep::dft_chunk *,bool,std::complex< double >)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,double,double,int,bool,std::complex< double >,meep::dft_chunk *,bool)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,double,double,int,bool,std::complex< double >,meep::dft_chunk *)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,double,double,int,bool,std::complex< double >)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,double,double,int,bool)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,double,double,int)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,double const *,size_t,bool,std::complex< double >,meep::dft_chunk *,bool,std::complex< double >,bool,int,int,bool)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,double const *,size_t,bool,std::complex< double >,meep::dft_chunk *,bool,std::complex< double >,bool,int,int)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,double const *,size_t,bool,std::complex< double >,meep::dft_chunk *,bool,std::complex< double >,bool,int)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,double const *,size_t,bool,std::complex< double >,meep::dft_chunk *,bool,std::complex< double >,bool)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,double const *,size_t,bool,std::complex< double >,meep::dft_chunk *,bool,std::complex< double >)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,double const *,size_t,bool,std::complex< double >,meep::dft_chunk *,bool)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,double const *,size_t,bool,std::complex< double >,meep::dft_chunk *)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,double const *,size_t,bool,std::complex< double >)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,double const *,size_t,bool)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,double const *,size_t)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,std::vector< double,std::allocator< double > > const &,bool,std::complex< double >,meep::dft_chunk *,bool,std::complex< double >,bool,int,int,bool)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,std::vector< double,std::allocator< double > > const &,bool,std::complex< double >,meep::dft_chunk *,bool,std::complex< double >,bool,int,int)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,std::vector< double,std::allocator< double > > const &,bool,std::complex< double >,meep::dft_chunk *,bool,std::complex< double >,bool,int)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,std::vector< double,std::allocator< double > > const &,bool,std::complex< double >,meep::dft_chunk *,bool,std::complex< double >,bool)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,std::vector< double,std::allocator< double > > const &,bool,std::complex< double >,meep::dft_chunk *,bool,std::complex< double >)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,std::vector< double,std::allocator< double > > const &,bool,std::complex< double >,meep::dft_chunk *,bool)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,std::vector< double,std::allocator< double > > const &,bool,std::complex< double >,meep::dft_chunk *)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,std::vector< double,std::allocator< double > > const &,bool,std::complex< double >)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,std::vector< double,std::allocator< double > > const &,bool)\n"
    "    meep::fields::add_dft(meep::component,meep::volume const &,std::vector< double,std::allocator< double > > const &)\n"
    "    meep::fields::add_dft(meep::volume_list const *,double,double,int,bool,bool)\n"
    "    meep::fields::add_dft(meep::volume_list const *,double,double,int,bool)\n"
    "    meep::fields::add_dft(meep::volume_list const *,double,double,int)\n"
    "    meep::fields::add_dft(meep::volume_list const *,std::vector< double,std::allocator< double > > const &,bool,bool)\n"
    "    meep::fields::add_dft(meep::volume_list const *,std::vector< double,std::allocator< double > > const &,bool)\n"
    "    meep::fields::add_dft(meep::volume_list const *,std::vector< double,std::allocator< double > > const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_update_dfts(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_update_dfts", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_update_dfts" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      (arg1)->update_dfts();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_dft_norm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_dft_norm", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_dft_norm" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      result = (double)(arg1)->dft_norm();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_dft_maxfreq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_dft_maxfreq", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_dft_maxfreq" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      result = (double)((meep::fields const *)arg1)->dft_maxfreq();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_max_decimation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "fields_max_decimation", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_max_decimation" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      result = (int)((meep::fields const *)arg1)->max_decimation();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_clear_dft_monitors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_clear_dft_monitors", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_clear_dft_monitors" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      (arg1)->clear_dft_monitors();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  double *arg3 = (double *) 0 ;
  size_t arg4 ;
  bool arg5 ;
  bool arg6 ;
  int arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_flux" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "double const *""'"); 
  }
  arg3 = reinterpret_cast< double * >(argp3);
  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "size_t""'");
  } 
  arg4 = static_cast< size_t >(val4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_flux" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_flux" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  ecode7 = SWIG_AsVal_int(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft_flux" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  {
    try {
      result = (arg1)->add_dft_flux((meep::volume_list const *)arg2,(double const *)arg3,arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  double *arg3 = (double *) 0 ;
  size_t arg4 ;
  bool arg5 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_flux" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "double const *""'"); 
  }
  arg3 = reinterpret_cast< double * >(argp3);
  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "size_t""'");
  } 
  arg4 = static_cast< size_t >(val4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_flux" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_flux" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      result = (arg1)->add_dft_flux((meep::volume_list const *)arg2,(double const *)arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  double *arg3 = (double *) 0 ;
  size_t arg4 ;
  bool arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_flux" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "double const *""'"); 
  }
  arg3 = reinterpret_cast< double * >(argp3);
  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "size_t""'");
  } 
  arg4 = static_cast< size_t >(val4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_flux" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  {
    try {
      result = (arg1)->add_dft_flux((meep::volume_list const *)arg2,(double const *)arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  double *arg3 = (double *) 0 ;
  size_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_flux" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "double const *""'"); 
  }
  arg3 = reinterpret_cast< double * >(argp3);
  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "size_t""'");
  } 
  arg4 = static_cast< size_t >(val4);
  {
    try {
      result = (arg1)->add_dft_flux((meep::volume_list const *)arg2,(double const *)arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  std::vector< double,std::allocator< double > > *arg3 = 0 ;
  int arg4 ;
  bool arg5 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  int val4 ;
  int ecode4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_flux" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg3 = ptr;
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_flux" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_flux" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      result = (arg1)->add_dft_flux((meep::volume_list const *)arg2,(std::vector< double,std::allocator< double > > const &)*arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  std::vector< double,std::allocator< double > > *arg3 = 0 ;
  int arg4 ;
  bool arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  int val4 ;
  int ecode4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_flux" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg3 = ptr;
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_flux" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  {
    try {
      result = (arg1)->add_dft_flux((meep::volume_list const *)arg2,(std::vector< double,std::allocator< double > > const &)*arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  std::vector< double,std::allocator< double > > *arg3 = 0 ;
  int arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_flux" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg3 = ptr;
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    try {
      result = (arg1)->add_dft_flux((meep::volume_list const *)arg2,(std::vector< double,std::allocator< double > > const &)*arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  std::vector< double,std::allocator< double > > *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_flux" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      result = (arg1)->add_dft_flux((meep::volume_list const *)arg2,(std::vector< double,std::allocator< double > > const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux__SWIG_8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  double arg3 ;
  double arg4 ;
  int arg5 ;
  bool arg6 ;
  bool arg7 ;
  int arg8 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  int val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_flux" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_flux" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_flux" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft_flux" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  ecode8 = SWIG_AsVal_int(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_dft_flux" "', argument " "8"" of type '" "int""'");
  } 
  arg8 = static_cast< int >(val8);
  {
    try {
      result = (arg1)->add_dft_flux((meep::volume_list const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux__SWIG_9(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  double arg3 ;
  double arg4 ;
  int arg5 ;
  bool arg6 ;
  bool arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_flux" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_flux" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_flux" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft_flux" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  {
    try {
      result = (arg1)->add_dft_flux((meep::volume_list const *)arg2,arg3,arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux__SWIG_10(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  double arg3 ;
  double arg4 ;
  int arg5 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_flux" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_flux" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_flux" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      result = (arg1)->add_dft_flux((meep::volume_list const *)arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux__SWIG_11(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  double arg3 ;
  double arg4 ;
  int arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_flux" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_flux" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    try {
      result = (arg1)->add_dft_flux((meep::volume_list const *)arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux__SWIG_12(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  bool arg7 ;
  bool arg8 ;
  int arg9 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  bool val8 ;
  int ecode8 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux", 9, 9, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_add_dft_flux" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_flux" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_flux" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft_flux" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  ecode8 = SWIG_AsVal_bool(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_dft_flux" "', argument " "8"" of type '" "bool""'");
  } 
  arg8 = static_cast< bool >(val8);
  ecode9 = SWIG_AsVal_int(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_add_dft_flux" "', argument " "9"" of type '" "int""'");
  } 
  arg9 = static_cast< int >(val9);
  {
    try {
      result = (arg1)->add_dft_flux(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux__SWIG_13(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  bool arg7 ;
  bool arg8 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  bool val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_add_dft_flux" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_flux" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_flux" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft_flux" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  ecode8 = SWIG_AsVal_bool(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_dft_flux" "', argument " "8"" of type '" "bool""'");
  } 
  arg8 = static_cast< bool >(val8);
  {
    try {
      result = (arg1)->add_dft_flux(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux__SWIG_14(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  bool arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_add_dft_flux" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_flux" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_flux" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft_flux" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  {
    try {
      result = (arg1)->add_dft_flux(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux__SWIG_15(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_add_dft_flux" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_flux" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_flux" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  {
    try {
      result = (arg1)->add_dft_flux(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux__SWIG_16(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  std::vector< double,std::allocator< double > > *arg4 = 0 ;
  bool arg5 ;
  bool arg6 ;
  int arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  bool val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_add_dft_flux" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg4 = ptr;
  }
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_flux" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_flux" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  ecode7 = SWIG_AsVal_int(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft_flux" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  {
    try {
      result = (arg1)->add_dft_flux(arg2,(meep::volume const &)*arg3,(std::vector< double,std::allocator< double > > const &)*arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux__SWIG_17(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  std::vector< double,std::allocator< double > > *arg4 = 0 ;
  bool arg5 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  bool val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_add_dft_flux" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg4 = ptr;
  }
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_flux" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_flux" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      result = (arg1)->add_dft_flux(arg2,(meep::volume const &)*arg3,(std::vector< double,std::allocator< double > > const &)*arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux__SWIG_18(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  std::vector< double,std::allocator< double > > *arg4 = 0 ;
  bool arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  bool val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_add_dft_flux" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg4 = ptr;
  }
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_flux" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  {
    try {
      result = (arg1)->add_dft_flux(arg2,(meep::volume const &)*arg3,(std::vector< double,std::allocator< double > > const &)*arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux__SWIG_19(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  std::vector< double,std::allocator< double > > *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_add_dft_flux" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg4 = ptr;
  }
  {
    try {
      result = (arg1)->add_dft_flux(arg2,(meep::volume const &)*arg3,(std::vector< double,std::allocator< double > > const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux__SWIG_20(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  double *arg4 = (double *) 0 ;
  size_t arg5 ;
  bool arg6 ;
  bool arg7 ;
  int arg8 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  size_t val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  int val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_add_dft_flux" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "double const *""'"); 
  }
  arg4 = reinterpret_cast< double * >(argp4);
  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_flux" "', argument " "5"" of type '" "size_t""'");
  } 
  arg5 = static_cast< size_t >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_flux" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft_flux" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  ecode8 = SWIG_AsVal_int(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_dft_flux" "', argument " "8"" of type '" "int""'");
  } 
  arg8 = static_cast< int >(val8);
  {
    try {
      result = (arg1)->add_dft_flux(arg2,(meep::volume const &)*arg3,(double const *)arg4,arg5,arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux__SWIG_21(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  double *arg4 = (double *) 0 ;
  size_t arg5 ;
  bool arg6 ;
  bool arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  size_t val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_add_dft_flux" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "double const *""'"); 
  }
  arg4 = reinterpret_cast< double * >(argp4);
  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_flux" "', argument " "5"" of type '" "size_t""'");
  } 
  arg5 = static_cast< size_t >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_flux" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft_flux" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  {
    try {
      result = (arg1)->add_dft_flux(arg2,(meep::volume const &)*arg3,(double const *)arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux__SWIG_22(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  double *arg4 = (double *) 0 ;
  size_t arg5 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  size_t val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_add_dft_flux" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "double const *""'"); 
  }
  arg4 = reinterpret_cast< double * >(argp4);
  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_flux" "', argument " "5"" of type '" "size_t""'");
  } 
  arg5 = static_cast< size_t >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_flux" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      result = (arg1)->add_dft_flux(arg2,(meep::volume const &)*arg3,(double const *)arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux__SWIG_23(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  double *arg4 = (double *) 0 ;
  size_t arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  size_t val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_add_dft_flux" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft_flux" "', argument " "4"" of type '" "double const *""'"); 
  }
  arg4 = reinterpret_cast< double * >(argp4);
  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_flux" "', argument " "5"" of type '" "size_t""'");
  } 
  arg5 = static_cast< size_t >(val5);
  {
    try {
      result = (arg1)->add_dft_flux(arg2,(meep::volume const &)*arg3,(double const *)arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[10] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 9) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< double,std::allocator< double > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_fields_add_dft_flux__SWIG_7(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_size_t(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_fields_add_dft_flux__SWIG_3(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< double,std::allocator< double > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_fields_add_dft_flux__SWIG_6(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_fields_add_dft_flux__SWIG_19(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_size_t(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_add_dft_flux__SWIG_2(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_add_dft_flux__SWIG_11(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< double,std::allocator< double > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_add_dft_flux__SWIG_5(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_size_t(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_add_dft_flux__SWIG_23(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_add_dft_flux__SWIG_18(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_size_t(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_add_dft_flux__SWIG_1(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_add_dft_flux__SWIG_10(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< double,std::allocator< double > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_add_dft_flux__SWIG_4(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_size_t(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_add_dft_flux__SWIG_22(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_add_dft_flux__SWIG_15(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_add_dft_flux__SWIG_17(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_size_t(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_int(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_fields_add_dft_flux__SWIG_0(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_fields_add_dft_flux__SWIG_9(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_size_t(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_fields_add_dft_flux__SWIG_21(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_fields_add_dft_flux__SWIG_14(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_int(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_fields_add_dft_flux__SWIG_16(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_int(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    return _wrap_fields_add_dft_flux__SWIG_8(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_size_t(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_int(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    return _wrap_fields_add_dft_flux__SWIG_20(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_bool(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    return _wrap_fields_add_dft_flux__SWIG_13(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 9) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_bool(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    {
                      int res = SWIG_AsVal_int(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      return _wrap_fields_add_dft_flux__SWIG_12(self, args);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_add_dft_flux'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::add_dft_flux(meep::volume_list const *,double const *,size_t,bool,bool,int)\n"
    "    meep::fields::add_dft_flux(meep::volume_list const *,double const *,size_t,bool,bool)\n"
    "    meep::fields::add_dft_flux(meep::volume_list const *,double const *,size_t,bool)\n"
    "    meep::fields::add_dft_flux(meep::volume_list const *,double const *,size_t)\n"
    "    meep::fields::add_dft_flux(meep::volume_list const *,std::vector< double,std::allocator< double > > const &,int,bool,bool)\n"
    "    meep::fields::add_dft_flux(meep::volume_list const *,std::vector< double,std::allocator< double > > const &,int,bool)\n"
    "    meep::fields::add_dft_flux(meep::volume_list const *,std::vector< double,std::allocator< double > > const &,int)\n"
    "    meep::fields::add_dft_flux(meep::volume_list const *,std::vector< double,std::allocator< double > > const &)\n"
    "    meep::fields::add_dft_flux(meep::volume_list const *,double,double,int,bool,bool,int)\n"
    "    meep::fields::add_dft_flux(meep::volume_list const *,double,double,int,bool,bool)\n"
    "    meep::fields::add_dft_flux(meep::volume_list const *,double,double,int,bool)\n"
    "    meep::fields::add_dft_flux(meep::volume_list const *,double,double,int)\n"
    "    meep::fields::add_dft_flux(meep::direction,meep::volume const &,double,double,int,bool,bool,int)\n"
    "    meep::fields::add_dft_flux(meep::direction,meep::volume const &,double,double,int,bool,bool)\n"
    "    meep::fields::add_dft_flux(meep::direction,meep::volume const &,double,double,int,bool)\n"
    "    meep::fields::add_dft_flux(meep::direction,meep::volume const &,double,double,int)\n"
    "    meep::fields::add_dft_flux(meep::direction,meep::volume const &,std::vector< double,std::allocator< double > > const &,bool,bool,int)\n"
    "    meep::fields::add_dft_flux(meep::direction,meep::volume const &,std::vector< double,std::allocator< double > > const &,bool,bool)\n"
    "    meep::fields::add_dft_flux(meep::direction,meep::volume const &,std::vector< double,std::allocator< double > > const &,bool)\n"
    "    meep::fields::add_dft_flux(meep::direction,meep::volume const &,std::vector< double,std::allocator< double > > const &)\n"
    "    meep::fields::add_dft_flux(meep::direction,meep::volume const &,double const *,size_t,bool,bool,int)\n"
    "    meep::fields::add_dft_flux(meep::direction,meep::volume const &,double const *,size_t,bool,bool)\n"
    "    meep::fields::add_dft_flux(meep::direction,meep::volume const &,double const *,size_t,bool)\n"
    "    meep::fields::add_dft_flux(meep::direction,meep::volume const &,double const *,size_t)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux_box__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  double arg3 ;
  double arg4 ;
  int arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux_box", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux_box" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_flux_box" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux_box" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_add_dft_flux_box" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_flux_box" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_flux_box" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    try {
      result = (arg1)->add_dft_flux_box((meep::volume const &)*arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux_box__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  std::vector< double,std::allocator< double > > *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux_box", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux_box" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_flux_box" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux_box" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_flux_box" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux_box" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      result = (arg1)->add_dft_flux_box((meep::volume const &)*arg2,(std::vector< double,std::allocator< double > > const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux_box(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< double,std::allocator< double > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_fields_add_dft_flux_box__SWIG_1(self, args);
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_add_dft_flux_box__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_add_dft_flux_box'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::add_dft_flux_box(meep::volume const &,double,double,int)\n"
    "    meep::fields::add_dft_flux_box(meep::volume const &,std::vector< double,std::allocator< double > > const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux_plane__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  double arg3 ;
  double arg4 ;
  int arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux_plane", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux_plane" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_flux_plane" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux_plane" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_add_dft_flux_plane" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_flux_plane" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_flux_plane" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    try {
      result = (arg1)->add_dft_flux_plane((meep::volume const &)*arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux_plane__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  std::vector< double,std::allocator< double > > *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_flux_plane", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_flux_plane" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_flux_plane" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux_plane" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_flux_plane" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_flux_plane" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      result = (arg1)->add_dft_flux_plane((meep::volume const &)*arg2,(std::vector< double,std::allocator< double > > const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_flux_plane(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< double,std::allocator< double > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_fields_add_dft_flux_plane__SWIG_1(self, args);
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_add_dft_flux_plane__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_add_dft_flux_plane'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::add_dft_flux_plane(meep::volume const &,double,double,int)\n"
    "    meep::fields::add_dft_flux_plane(meep::volume const &,std::vector< double,std::allocator< double > > const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_add_mode_monitor__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  bool arg7 ;
  int arg8 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  int val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_mode_monitor", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_mode_monitor" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_add_mode_monitor" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_mode_monitor" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_mode_monitor" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_mode_monitor" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_mode_monitor" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_mode_monitor" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_mode_monitor" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  ecode8 = SWIG_AsVal_int(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_mode_monitor" "', argument " "8"" of type '" "int""'");
  } 
  arg8 = static_cast< int >(val8);
  {
    try {
      result = (arg1)->add_mode_monitor(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_mode_monitor__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  bool arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_mode_monitor", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_mode_monitor" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_add_mode_monitor" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_mode_monitor" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_mode_monitor" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_mode_monitor" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_mode_monitor" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_mode_monitor" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_mode_monitor" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  {
    try {
      result = (arg1)->add_mode_monitor(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_mode_monitor__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_mode_monitor", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_mode_monitor" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_add_mode_monitor" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_mode_monitor" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_mode_monitor" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_mode_monitor" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_mode_monitor" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_mode_monitor" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  {
    try {
      result = (arg1)->add_mode_monitor(arg2,(meep::volume const &)*arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_mode_monitor__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  std::vector< double,std::allocator< double > > *arg4 = 0 ;
  bool arg5 ;
  int arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  bool val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_mode_monitor", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_mode_monitor" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_add_mode_monitor" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_mode_monitor" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_mode_monitor" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_mode_monitor" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_mode_monitor" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg4 = ptr;
  }
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_mode_monitor" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_mode_monitor" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  {
    try {
      result = (arg1)->add_mode_monitor(arg2,(meep::volume const &)*arg3,(std::vector< double,std::allocator< double > > const &)*arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_mode_monitor__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  std::vector< double,std::allocator< double > > *arg4 = 0 ;
  bool arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  bool val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_mode_monitor", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_mode_monitor" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_add_mode_monitor" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_mode_monitor" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_mode_monitor" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_mode_monitor" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_mode_monitor" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg4 = ptr;
  }
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_mode_monitor" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  {
    try {
      result = (arg1)->add_mode_monitor(arg2,(meep::volume const &)*arg3,(std::vector< double,std::allocator< double > > const &)*arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_mode_monitor__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  std::vector< double,std::allocator< double > > *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_mode_monitor", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_mode_monitor" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_add_mode_monitor" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_mode_monitor" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_mode_monitor" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_mode_monitor" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_mode_monitor" "', argument " "4"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg4 = ptr;
  }
  {
    try {
      result = (arg1)->add_mode_monitor(arg2,(meep::volume const &)*arg3,(std::vector< double,std::allocator< double > > const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_mode_monitor__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  double *arg4 = (double *) 0 ;
  size_t arg5 ;
  bool arg6 ;
  int arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  size_t val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_mode_monitor", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_mode_monitor" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_add_mode_monitor" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_mode_monitor" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_mode_monitor" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_mode_monitor" "', argument " "4"" of type '" "double const *""'"); 
  }
  arg4 = reinterpret_cast< double * >(argp4);
  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_mode_monitor" "', argument " "5"" of type '" "size_t""'");
  } 
  arg5 = static_cast< size_t >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_mode_monitor" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  ecode7 = SWIG_AsVal_int(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_mode_monitor" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  {
    try {
      result = (arg1)->add_mode_monitor(arg2,(meep::volume const &)*arg3,(double const *)arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_mode_monitor__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  double *arg4 = (double *) 0 ;
  size_t arg5 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  size_t val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_mode_monitor", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_mode_monitor" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_add_mode_monitor" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_mode_monitor" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_mode_monitor" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_mode_monitor" "', argument " "4"" of type '" "double const *""'"); 
  }
  arg4 = reinterpret_cast< double * >(argp4);
  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_mode_monitor" "', argument " "5"" of type '" "size_t""'");
  } 
  arg5 = static_cast< size_t >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_mode_monitor" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      result = (arg1)->add_mode_monitor(arg2,(meep::volume const &)*arg3,(double const *)arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_mode_monitor__SWIG_8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  double *arg4 = (double *) 0 ;
  size_t arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  size_t val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  SwigValueWrapper< meep::dft_flux > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_mode_monitor", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_mode_monitor" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_add_mode_monitor" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_mode_monitor" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_mode_monitor" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_mode_monitor" "', argument " "4"" of type '" "double const *""'"); 
  }
  arg4 = reinterpret_cast< double * >(argp4);
  ecode5 = SWIG_AsVal_size_t(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_mode_monitor" "', argument " "5"" of type '" "size_t""'");
  } 
  arg5 = static_cast< size_t >(val5);
  {
    try {
      result = (arg1)->add_mode_monitor(arg2,(meep::volume const &)*arg3,(double const *)arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_flux(static_cast< const meep::dft_flux& >(result))), SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_mode_monitor(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[9] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 8) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_fields_add_mode_monitor__SWIG_5(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_size_t(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_add_mode_monitor__SWIG_8(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_add_mode_monitor__SWIG_4(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_size_t(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_add_mode_monitor__SWIG_7(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_add_mode_monitor__SWIG_2(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_add_mode_monitor__SWIG_3(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_size_t(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_int(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_fields_add_mode_monitor__SWIG_6(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_fields_add_mode_monitor__SWIG_1(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_int(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    return _wrap_fields_add_mode_monitor__SWIG_0(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_add_mode_monitor'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::add_mode_monitor(meep::direction,meep::volume const &,double,double,int,bool,int)\n"
    "    meep::fields::add_mode_monitor(meep::direction,meep::volume const &,double,double,int,bool)\n"
    "    meep::fields::add_mode_monitor(meep::direction,meep::volume const &,double,double,int)\n"
    "    meep::fields::add_mode_monitor(meep::direction,meep::volume const &,std::vector< double,std::allocator< double > > const &,bool,int)\n"
    "    meep::fields::add_mode_monitor(meep::direction,meep::volume const &,std::vector< double,std::allocator< double > > const &,bool)\n"
    "    meep::fields::add_mode_monitor(meep::direction,meep::volume const &,std::vector< double,std::allocator< double > > const &)\n"
    "    meep::fields::add_mode_monitor(meep::direction,meep::volume const &,double const *,size_t,bool,int)\n"
    "    meep::fields::add_mode_monitor(meep::direction,meep::volume const &,double const *,size_t,bool)\n"
    "    meep::fields::add_mode_monitor(meep::direction,meep::volume const &,double const *,size_t)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_fields__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component *arg2 = (meep::component *) 0 ;
  int arg3 ;
  SwigValueWrapper< meep::volume > arg4 ;
  double arg5 ;
  double arg6 ;
  int arg7 ;
  bool arg8 ;
  int arg9 ;
  bool arg10 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  bool val8 ;
  int ecode8 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  bool val10 ;
  int ecode10 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  SwigValueWrapper< meep::dft_fields > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_fields", 9, 9, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_fields" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    if (!PyList_Check(obj1)) {
      meep::abort("Expected a list");
    }
    arg3 = PyList_Size(obj1);
    arg2 = new meep::component[arg3];
    
    for (Py_ssize_t i = 0; i < arg3; i++) {
      arg2[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(obj1, i));
    }
  }
  {
    res4 = SWIG_ConvertPtr(obj2, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft_fields" "', argument " "4"" of type '" "meep::volume const""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_fields" "', argument " "4"" of type '" "meep::volume const""'");
    } else {
      meep::volume * temp = reinterpret_cast< meep::volume * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  ecode5 = SWIG_AsVal_double(obj3, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_fields" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(obj4, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_fields" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_int(obj5, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft_fields" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  ecode8 = SWIG_AsVal_bool(obj6, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_dft_fields" "', argument " "8"" of type '" "bool""'");
  } 
  arg8 = static_cast< bool >(val8);
  ecode9 = SWIG_AsVal_int(obj7, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_add_dft_fields" "', argument " "9"" of type '" "int""'");
  } 
  arg9 = static_cast< int >(val9);
  ecode10 = SWIG_AsVal_bool(obj8, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "fields_add_dft_fields" "', argument " "10"" of type '" "bool""'");
  } 
  arg10 = static_cast< bool >(val10);
  {
    try {
      result = (arg1)->add_dft_fields(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_fields(static_cast< const meep::dft_fields& >(result))), SWIGTYPE_p_meep__dft_fields, SWIG_POINTER_OWN |  0 );
  {
    delete[] arg2;
  }
  return resultobj;
fail:
  {
    delete[] arg2;
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_fields__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component *arg2 = (meep::component *) 0 ;
  int arg3 ;
  SwigValueWrapper< meep::volume > arg4 ;
  double arg5 ;
  double arg6 ;
  int arg7 ;
  bool arg8 ;
  int arg9 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  bool val8 ;
  int ecode8 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  SwigValueWrapper< meep::dft_fields > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_fields", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_fields" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    if (!PyList_Check(obj1)) {
      meep::abort("Expected a list");
    }
    arg3 = PyList_Size(obj1);
    arg2 = new meep::component[arg3];
    
    for (Py_ssize_t i = 0; i < arg3; i++) {
      arg2[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(obj1, i));
    }
  }
  {
    res4 = SWIG_ConvertPtr(obj2, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft_fields" "', argument " "4"" of type '" "meep::volume const""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_fields" "', argument " "4"" of type '" "meep::volume const""'");
    } else {
      meep::volume * temp = reinterpret_cast< meep::volume * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  ecode5 = SWIG_AsVal_double(obj3, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_fields" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(obj4, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_fields" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_int(obj5, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft_fields" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  ecode8 = SWIG_AsVal_bool(obj6, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_dft_fields" "', argument " "8"" of type '" "bool""'");
  } 
  arg8 = static_cast< bool >(val8);
  ecode9 = SWIG_AsVal_int(obj7, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_add_dft_fields" "', argument " "9"" of type '" "int""'");
  } 
  arg9 = static_cast< int >(val9);
  {
    try {
      result = (arg1)->add_dft_fields(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_fields(static_cast< const meep::dft_fields& >(result))), SWIGTYPE_p_meep__dft_fields, SWIG_POINTER_OWN |  0 );
  {
    delete[] arg2;
  }
  return resultobj;
fail:
  {
    delete[] arg2;
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_fields__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component *arg2 = (meep::component *) 0 ;
  int arg3 ;
  SwigValueWrapper< meep::volume > arg4 ;
  double arg5 ;
  double arg6 ;
  int arg7 ;
  bool arg8 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  bool val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  SwigValueWrapper< meep::dft_fields > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_fields", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_fields" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    if (!PyList_Check(obj1)) {
      meep::abort("Expected a list");
    }
    arg3 = PyList_Size(obj1);
    arg2 = new meep::component[arg3];
    
    for (Py_ssize_t i = 0; i < arg3; i++) {
      arg2[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(obj1, i));
    }
  }
  {
    res4 = SWIG_ConvertPtr(obj2, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft_fields" "', argument " "4"" of type '" "meep::volume const""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_fields" "', argument " "4"" of type '" "meep::volume const""'");
    } else {
      meep::volume * temp = reinterpret_cast< meep::volume * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  ecode5 = SWIG_AsVal_double(obj3, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_fields" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(obj4, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_fields" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_int(obj5, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft_fields" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  ecode8 = SWIG_AsVal_bool(obj6, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_dft_fields" "', argument " "8"" of type '" "bool""'");
  } 
  arg8 = static_cast< bool >(val8);
  {
    try {
      result = (arg1)->add_dft_fields(arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_fields(static_cast< const meep::dft_fields& >(result))), SWIGTYPE_p_meep__dft_fields, SWIG_POINTER_OWN |  0 );
  {
    delete[] arg2;
  }
  return resultobj;
fail:
  {
    delete[] arg2;
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_fields__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component *arg2 = (meep::component *) 0 ;
  int arg3 ;
  SwigValueWrapper< meep::volume > arg4 ;
  double arg5 ;
  double arg6 ;
  int arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  SwigValueWrapper< meep::dft_fields > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_fields", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_fields" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    if (!PyList_Check(obj1)) {
      meep::abort("Expected a list");
    }
    arg3 = PyList_Size(obj1);
    arg2 = new meep::component[arg3];
    
    for (Py_ssize_t i = 0; i < arg3; i++) {
      arg2[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(obj1, i));
    }
  }
  {
    res4 = SWIG_ConvertPtr(obj2, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft_fields" "', argument " "4"" of type '" "meep::volume const""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_fields" "', argument " "4"" of type '" "meep::volume const""'");
    } else {
      meep::volume * temp = reinterpret_cast< meep::volume * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  ecode5 = SWIG_AsVal_double(obj3, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_fields" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(obj4, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_fields" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_int(obj5, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft_fields" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  {
    try {
      result = (arg1)->add_dft_fields(arg2,arg3,arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_fields(static_cast< const meep::dft_fields& >(result))), SWIGTYPE_p_meep__dft_fields, SWIG_POINTER_OWN |  0 );
  {
    delete[] arg2;
  }
  return resultobj;
fail:
  {
    delete[] arg2;
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_fields__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component *arg2 = (meep::component *) 0 ;
  int arg3 ;
  SwigValueWrapper< meep::volume > arg4 ;
  std::vector< double,std::allocator< double > > *arg5 = 0 ;
  bool arg6 ;
  int arg7 ;
  bool arg8 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  int res5 = SWIG_OLDOBJ ;
  bool val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  bool val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  SwigValueWrapper< meep::dft_fields > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_fields", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_fields" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    if (!PyList_Check(obj1)) {
      meep::abort("Expected a list");
    }
    arg3 = PyList_Size(obj1);
    arg2 = new meep::component[arg3];
    
    for (Py_ssize_t i = 0; i < arg3; i++) {
      arg2[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(obj1, i));
    }
  }
  {
    res4 = SWIG_ConvertPtr(obj2, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft_fields" "', argument " "4"" of type '" "meep::volume const""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_fields" "', argument " "4"" of type '" "meep::volume const""'");
    } else {
      meep::volume * temp = reinterpret_cast< meep::volume * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res5 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_add_dft_fields" "', argument " "5"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_fields" "', argument " "5"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg5 = ptr;
  }
  ecode6 = SWIG_AsVal_bool(obj4, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_fields" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  ecode7 = SWIG_AsVal_int(obj5, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft_fields" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  ecode8 = SWIG_AsVal_bool(obj6, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_dft_fields" "', argument " "8"" of type '" "bool""'");
  } 
  arg8 = static_cast< bool >(val8);
  {
    try {
      result = (arg1)->add_dft_fields(arg2,arg3,arg4,(std::vector< double,std::allocator< double > > const &)*arg5,arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_fields(static_cast< const meep::dft_fields& >(result))), SWIGTYPE_p_meep__dft_fields, SWIG_POINTER_OWN |  0 );
  {
    delete[] arg2;
  }
  if (SWIG_IsNewObj(res5)) delete arg5;
  return resultobj;
fail:
  {
    delete[] arg2;
  }
  if (SWIG_IsNewObj(res5)) delete arg5;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_fields__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component *arg2 = (meep::component *) 0 ;
  int arg3 ;
  SwigValueWrapper< meep::volume > arg4 ;
  std::vector< double,std::allocator< double > > *arg5 = 0 ;
  bool arg6 ;
  int arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  int res5 = SWIG_OLDOBJ ;
  bool val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  SwigValueWrapper< meep::dft_fields > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_fields", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_fields" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    if (!PyList_Check(obj1)) {
      meep::abort("Expected a list");
    }
    arg3 = PyList_Size(obj1);
    arg2 = new meep::component[arg3];
    
    for (Py_ssize_t i = 0; i < arg3; i++) {
      arg2[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(obj1, i));
    }
  }
  {
    res4 = SWIG_ConvertPtr(obj2, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft_fields" "', argument " "4"" of type '" "meep::volume const""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_fields" "', argument " "4"" of type '" "meep::volume const""'");
    } else {
      meep::volume * temp = reinterpret_cast< meep::volume * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res5 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_add_dft_fields" "', argument " "5"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_fields" "', argument " "5"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg5 = ptr;
  }
  ecode6 = SWIG_AsVal_bool(obj4, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_fields" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  ecode7 = SWIG_AsVal_int(obj5, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft_fields" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  {
    try {
      result = (arg1)->add_dft_fields(arg2,arg3,arg4,(std::vector< double,std::allocator< double > > const &)*arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_fields(static_cast< const meep::dft_fields& >(result))), SWIGTYPE_p_meep__dft_fields, SWIG_POINTER_OWN |  0 );
  {
    delete[] arg2;
  }
  if (SWIG_IsNewObj(res5)) delete arg5;
  return resultobj;
fail:
  {
    delete[] arg2;
  }
  if (SWIG_IsNewObj(res5)) delete arg5;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_fields__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component *arg2 = (meep::component *) 0 ;
  int arg3 ;
  SwigValueWrapper< meep::volume > arg4 ;
  std::vector< double,std::allocator< double > > *arg5 = 0 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  int res5 = SWIG_OLDOBJ ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  SwigValueWrapper< meep::dft_fields > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_fields", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_fields" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    if (!PyList_Check(obj1)) {
      meep::abort("Expected a list");
    }
    arg3 = PyList_Size(obj1);
    arg2 = new meep::component[arg3];
    
    for (Py_ssize_t i = 0; i < arg3; i++) {
      arg2[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(obj1, i));
    }
  }
  {
    res4 = SWIG_ConvertPtr(obj2, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft_fields" "', argument " "4"" of type '" "meep::volume const""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_fields" "', argument " "4"" of type '" "meep::volume const""'");
    } else {
      meep::volume * temp = reinterpret_cast< meep::volume * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res5 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_add_dft_fields" "', argument " "5"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_fields" "', argument " "5"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg5 = ptr;
  }
  ecode6 = SWIG_AsVal_bool(obj4, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_fields" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      result = (arg1)->add_dft_fields(arg2,arg3,arg4,(std::vector< double,std::allocator< double > > const &)*arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_fields(static_cast< const meep::dft_fields& >(result))), SWIGTYPE_p_meep__dft_fields, SWIG_POINTER_OWN |  0 );
  {
    delete[] arg2;
  }
  if (SWIG_IsNewObj(res5)) delete arg5;
  return resultobj;
fail:
  {
    delete[] arg2;
  }
  if (SWIG_IsNewObj(res5)) delete arg5;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_fields__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component *arg2 = (meep::component *) 0 ;
  int arg3 ;
  SwigValueWrapper< meep::volume > arg4 ;
  std::vector< double,std::allocator< double > > *arg5 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  int res5 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  SwigValueWrapper< meep::dft_fields > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_fields", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_fields" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    if (!PyList_Check(obj1)) {
      meep::abort("Expected a list");
    }
    arg3 = PyList_Size(obj1);
    arg2 = new meep::component[arg3];
    
    for (Py_ssize_t i = 0; i < arg3; i++) {
      arg2[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(obj1, i));
    }
  }
  {
    res4 = SWIG_ConvertPtr(obj2, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft_fields" "', argument " "4"" of type '" "meep::volume const""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_fields" "', argument " "4"" of type '" "meep::volume const""'");
    } else {
      meep::volume * temp = reinterpret_cast< meep::volume * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res5 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_add_dft_fields" "', argument " "5"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_fields" "', argument " "5"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg5 = ptr;
  }
  {
    try {
      result = (arg1)->add_dft_fields(arg2,arg3,arg4,(std::vector< double,std::allocator< double > > const &)*arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_fields(static_cast< const meep::dft_fields& >(result))), SWIGTYPE_p_meep__dft_fields, SWIG_POINTER_OWN |  0 );
  {
    delete[] arg2;
  }
  if (SWIG_IsNewObj(res5)) delete arg5;
  return resultobj;
fail:
  {
    delete[] arg2;
  }
  if (SWIG_IsNewObj(res5)) delete arg5;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_fields__SWIG_8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component *arg2 = (meep::component *) 0 ;
  int arg3 ;
  SwigValueWrapper< meep::volume > arg4 ;
  double *arg5 = (double *) 0 ;
  size_t arg6 ;
  bool arg7 ;
  int arg8 ;
  bool arg9 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  size_t val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  int val8 ;
  int ecode8 = 0 ;
  bool val9 ;
  int ecode9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  SwigValueWrapper< meep::dft_fields > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_fields", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_fields" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    if (!PyList_Check(obj1)) {
      meep::abort("Expected a list");
    }
    arg3 = PyList_Size(obj1);
    arg2 = new meep::component[arg3];
    
    for (Py_ssize_t i = 0; i < arg3; i++) {
      arg2[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(obj1, i));
    }
  }
  {
    res4 = SWIG_ConvertPtr(obj2, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft_fields" "', argument " "4"" of type '" "meep::volume const""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_fields" "', argument " "4"" of type '" "meep::volume const""'");
    } else {
      meep::volume * temp = reinterpret_cast< meep::volume * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  res5 = SWIG_ConvertPtr(obj3, &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_add_dft_fields" "', argument " "5"" of type '" "double const *""'"); 
  }
  arg5 = reinterpret_cast< double * >(argp5);
  ecode6 = SWIG_AsVal_size_t(obj4, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_fields" "', argument " "6"" of type '" "size_t""'");
  } 
  arg6 = static_cast< size_t >(val6);
  ecode7 = SWIG_AsVal_bool(obj5, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft_fields" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  ecode8 = SWIG_AsVal_int(obj6, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_dft_fields" "', argument " "8"" of type '" "int""'");
  } 
  arg8 = static_cast< int >(val8);
  ecode9 = SWIG_AsVal_bool(obj7, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_add_dft_fields" "', argument " "9"" of type '" "bool""'");
  } 
  arg9 = static_cast< bool >(val9);
  {
    try {
      result = (arg1)->add_dft_fields(arg2,arg3,arg4,(double const *)arg5,arg6,arg7,arg8,arg9);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_fields(static_cast< const meep::dft_fields& >(result))), SWIGTYPE_p_meep__dft_fields, SWIG_POINTER_OWN |  0 );
  {
    delete[] arg2;
  }
  return resultobj;
fail:
  {
    delete[] arg2;
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_fields__SWIG_9(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component *arg2 = (meep::component *) 0 ;
  int arg3 ;
  SwigValueWrapper< meep::volume > arg4 ;
  double *arg5 = (double *) 0 ;
  size_t arg6 ;
  bool arg7 ;
  int arg8 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  size_t val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  int val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  SwigValueWrapper< meep::dft_fields > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_fields", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_fields" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    if (!PyList_Check(obj1)) {
      meep::abort("Expected a list");
    }
    arg3 = PyList_Size(obj1);
    arg2 = new meep::component[arg3];
    
    for (Py_ssize_t i = 0; i < arg3; i++) {
      arg2[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(obj1, i));
    }
  }
  {
    res4 = SWIG_ConvertPtr(obj2, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft_fields" "', argument " "4"" of type '" "meep::volume const""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_fields" "', argument " "4"" of type '" "meep::volume const""'");
    } else {
      meep::volume * temp = reinterpret_cast< meep::volume * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  res5 = SWIG_ConvertPtr(obj3, &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_add_dft_fields" "', argument " "5"" of type '" "double const *""'"); 
  }
  arg5 = reinterpret_cast< double * >(argp5);
  ecode6 = SWIG_AsVal_size_t(obj4, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_fields" "', argument " "6"" of type '" "size_t""'");
  } 
  arg6 = static_cast< size_t >(val6);
  ecode7 = SWIG_AsVal_bool(obj5, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft_fields" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  ecode8 = SWIG_AsVal_int(obj6, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fields_add_dft_fields" "', argument " "8"" of type '" "int""'");
  } 
  arg8 = static_cast< int >(val8);
  {
    try {
      result = (arg1)->add_dft_fields(arg2,arg3,arg4,(double const *)arg5,arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_fields(static_cast< const meep::dft_fields& >(result))), SWIGTYPE_p_meep__dft_fields, SWIG_POINTER_OWN |  0 );
  {
    delete[] arg2;
  }
  return resultobj;
fail:
  {
    delete[] arg2;
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_fields__SWIG_10(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component *arg2 = (meep::component *) 0 ;
  int arg3 ;
  SwigValueWrapper< meep::volume > arg4 ;
  double *arg5 = (double *) 0 ;
  size_t arg6 ;
  bool arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  size_t val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  SwigValueWrapper< meep::dft_fields > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_fields", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_fields" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    if (!PyList_Check(obj1)) {
      meep::abort("Expected a list");
    }
    arg3 = PyList_Size(obj1);
    arg2 = new meep::component[arg3];
    
    for (Py_ssize_t i = 0; i < arg3; i++) {
      arg2[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(obj1, i));
    }
  }
  {
    res4 = SWIG_ConvertPtr(obj2, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft_fields" "', argument " "4"" of type '" "meep::volume const""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_fields" "', argument " "4"" of type '" "meep::volume const""'");
    } else {
      meep::volume * temp = reinterpret_cast< meep::volume * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  res5 = SWIG_ConvertPtr(obj3, &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_add_dft_fields" "', argument " "5"" of type '" "double const *""'"); 
  }
  arg5 = reinterpret_cast< double * >(argp5);
  ecode6 = SWIG_AsVal_size_t(obj4, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_fields" "', argument " "6"" of type '" "size_t""'");
  } 
  arg6 = static_cast< size_t >(val6);
  ecode7 = SWIG_AsVal_bool(obj5, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft_fields" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  {
    try {
      result = (arg1)->add_dft_fields(arg2,arg3,arg4,(double const *)arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_fields(static_cast< const meep::dft_fields& >(result))), SWIGTYPE_p_meep__dft_fields, SWIG_POINTER_OWN |  0 );
  {
    delete[] arg2;
  }
  return resultobj;
fail:
  {
    delete[] arg2;
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_fields__SWIG_11(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component *arg2 = (meep::component *) 0 ;
  int arg3 ;
  SwigValueWrapper< meep::volume > arg4 ;
  double *arg5 = (double *) 0 ;
  size_t arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  size_t val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  SwigValueWrapper< meep::dft_fields > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_fields", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_fields" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    if (!PyList_Check(obj1)) {
      meep::abort("Expected a list");
    }
    arg3 = PyList_Size(obj1);
    arg2 = new meep::component[arg3];
    
    for (Py_ssize_t i = 0; i < arg3; i++) {
      arg2[i] = (meep::component)PyInteger_AsLong(PyList_GetItem(obj1, i));
    }
  }
  {
    res4 = SWIG_ConvertPtr(obj2, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_add_dft_fields" "', argument " "4"" of type '" "meep::volume const""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_fields" "', argument " "4"" of type '" "meep::volume const""'");
    } else {
      meep::volume * temp = reinterpret_cast< meep::volume * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  res5 = SWIG_ConvertPtr(obj3, &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_add_dft_fields" "', argument " "5"" of type '" "double const *""'"); 
  }
  arg5 = reinterpret_cast< double * >(argp5);
  ecode6 = SWIG_AsVal_size_t(obj4, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_fields" "', argument " "6"" of type '" "size_t""'");
  } 
  arg6 = static_cast< size_t >(val6);
  {
    try {
      result = (arg1)->add_dft_fields(arg2,arg3,arg4,(double const *)arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_fields(static_cast< const meep::dft_fields& >(result))), SWIGTYPE_p_meep__dft_fields, SWIG_POINTER_OWN |  0 );
  {
    delete[] arg2;
  }
  return resultobj;
fail:
  {
    delete[] arg2;
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_fields(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[10] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 9) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyList_Check(argv[1]);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_fields_add_dft_fields__SWIG_7(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyList_Check(argv[1]);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_size_t(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_add_dft_fields__SWIG_11(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyList_Check(argv[1]);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_add_dft_fields__SWIG_6(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyList_Check(argv[1]);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_size_t(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_add_dft_fields__SWIG_10(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyList_Check(argv[1]);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_add_dft_fields__SWIG_3(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyList_Check(argv[1]);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_add_dft_fields__SWIG_5(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyList_Check(argv[1]);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_size_t(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_int(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_fields_add_dft_fields__SWIG_9(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyList_Check(argv[1]);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_fields_add_dft_fields__SWIG_2(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyList_Check(argv[1]);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< double,std::allocator< double > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_fields_add_dft_fields__SWIG_4(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyList_Check(argv[1]);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_size_t(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_int(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_bool(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    return _wrap_fields_add_dft_fields__SWIG_8(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyList_Check(argv[1]);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_int(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    return _wrap_fields_add_dft_fields__SWIG_1(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 9) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyList_Check(argv[1]);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_int(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    {
                      int res = SWIG_AsVal_bool(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      return _wrap_fields_add_dft_fields__SWIG_0(self, args);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_add_dft_fields'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::add_dft_fields(meep::component *,int,meep::volume const,double,double,int,bool,int,bool)\n"
    "    meep::fields::add_dft_fields(meep::component *,int,meep::volume const,double,double,int,bool,int)\n"
    "    meep::fields::add_dft_fields(meep::component *,int,meep::volume const,double,double,int,bool)\n"
    "    meep::fields::add_dft_fields(meep::component *,int,meep::volume const,double,double,int)\n"
    "    meep::fields::add_dft_fields(meep::component *,int,meep::volume const,std::vector< double,std::allocator< double > > const &,bool,int,bool)\n"
    "    meep::fields::add_dft_fields(meep::component *,int,meep::volume const,std::vector< double,std::allocator< double > > const &,bool,int)\n"
    "    meep::fields::add_dft_fields(meep::component *,int,meep::volume const,std::vector< double,std::allocator< double > > const &,bool)\n"
    "    meep::fields::add_dft_fields(meep::component *,int,meep::volume const,std::vector< double,std::allocator< double > > const &)\n"
    "    meep::fields::add_dft_fields(meep::component *,int,meep::volume const,double const *,size_t,bool,int,bool)\n"
    "    meep::fields::add_dft_fields(meep::component *,int,meep::volume const,double const *,size_t,bool,int)\n"
    "    meep::fields::add_dft_fields(meep::component *,int,meep::volume const,double const *,size_t,bool)\n"
    "    meep::fields::add_dft_fields(meep::component *,int,meep::volume const,double const *,size_t)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_process_dft_component__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::dft_chunk **arg2 = (meep::dft_chunk **) 0 ;
  int arg3 ;
  int arg4 ;
  meep::component arg5 ;
  char *arg6 = (char *) 0 ;
  std::complex< meep::realnum > **arg7 = (std::complex< meep::realnum > **) 0 ;
  int *arg8 = (int *) 0 ;
  size_t *arg9 = (size_t *) 0 ;
  meep::direction *arg10 = (meep::direction *) 0 ;
  void *arg11 = (void *) 0 ;
  void *arg12 = (void *) 0 ;
  meep::component arg13 ;
  bool *arg14 = (bool *) 0 ;
  bool arg15 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int res6 ;
  char *buf6 = 0 ;
  int alloc6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  int res11 ;
  int res12 ;
  void *argp14 = 0 ;
  int res14 = 0 ;
  bool val15 ;
  int ecode15 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  PyObject * obj14 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_process_dft_component", 15, 15, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13, &obj14)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_process_dft_component" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_process_dft_component" "', argument " "2"" of type '" "meep::dft_chunk **""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk ** >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_process_dft_component" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_process_dft_component" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    arg5 = static_cast<meep::component>(PyInteger_AsLong(obj4));
  }
  res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_process_dft_component" "', argument " "6"" of type '" "char const *""'");
  }
  arg6 = reinterpret_cast< char * >(buf6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_process_dft_component" "', argument " "7"" of type '" "std::complex< meep::realnum > **""'"); 
  }
  arg7 = reinterpret_cast< std::complex< meep::realnum > ** >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_process_dft_component" "', argument " "8"" of type '" "int *""'"); 
  }
  arg8 = reinterpret_cast< int * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_process_dft_component" "', argument " "9"" of type '" "size_t *""'"); 
  }
  arg9 = reinterpret_cast< size_t * >(argp9);
  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_meep__direction, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "fields_process_dft_component" "', argument " "10"" of type '" "meep::direction *""'"); 
  }
  arg10 = reinterpret_cast< meep::direction * >(argp10);
  res11 = SWIG_ConvertPtr(obj10,SWIG_as_voidptrptr(&arg11), 0, 0);
  if (!SWIG_IsOK(res11)) {
    SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "fields_process_dft_component" "', argument " "11"" of type '" "void *""'"); 
  }
  res12 = SWIG_ConvertPtr(obj11,SWIG_as_voidptrptr(&arg12), 0, 0);
  if (!SWIG_IsOK(res12)) {
    SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "fields_process_dft_component" "', argument " "12"" of type '" "void *""'"); 
  }
  {
    arg13 = static_cast<meep::component>(PyInteger_AsLong(obj12));
  }
  res14 = SWIG_ConvertPtr(obj13, &argp14,SWIGTYPE_p_bool, 0 |  0 );
  if (!SWIG_IsOK(res14)) {
    SWIG_exception_fail(SWIG_ArgError(res14), "in method '" "fields_process_dft_component" "', argument " "14"" of type '" "bool *""'"); 
  }
  arg14 = reinterpret_cast< bool * >(argp14);
  ecode15 = SWIG_AsVal_bool(obj14, &val15);
  if (!SWIG_IsOK(ecode15)) {
    SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "fields_process_dft_component" "', argument " "15"" of type '" "bool""'");
  } 
  arg15 = static_cast< bool >(val15);
  {
    try {
      result = (arg1)->process_dft_component(arg2,arg3,arg4,arg5,(char const *)arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
  return resultobj;
fail:
  if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_process_dft_component__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::dft_chunk **arg2 = (meep::dft_chunk **) 0 ;
  int arg3 ;
  int arg4 ;
  meep::component arg5 ;
  char *arg6 = (char *) 0 ;
  std::complex< meep::realnum > **arg7 = (std::complex< meep::realnum > **) 0 ;
  int *arg8 = (int *) 0 ;
  size_t *arg9 = (size_t *) 0 ;
  meep::direction *arg10 = (meep::direction *) 0 ;
  void *arg11 = (void *) 0 ;
  void *arg12 = (void *) 0 ;
  meep::component arg13 ;
  bool *arg14 = (bool *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int res6 ;
  char *buf6 = 0 ;
  int alloc6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  int res11 ;
  int res12 ;
  void *argp14 = 0 ;
  int res14 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_process_dft_component", 14, 14, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_process_dft_component" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_process_dft_component" "', argument " "2"" of type '" "meep::dft_chunk **""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk ** >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_process_dft_component" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_process_dft_component" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    arg5 = static_cast<meep::component>(PyInteger_AsLong(obj4));
  }
  res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_process_dft_component" "', argument " "6"" of type '" "char const *""'");
  }
  arg6 = reinterpret_cast< char * >(buf6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_process_dft_component" "', argument " "7"" of type '" "std::complex< meep::realnum > **""'"); 
  }
  arg7 = reinterpret_cast< std::complex< meep::realnum > ** >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_process_dft_component" "', argument " "8"" of type '" "int *""'"); 
  }
  arg8 = reinterpret_cast< int * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_process_dft_component" "', argument " "9"" of type '" "size_t *""'"); 
  }
  arg9 = reinterpret_cast< size_t * >(argp9);
  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_meep__direction, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "fields_process_dft_component" "', argument " "10"" of type '" "meep::direction *""'"); 
  }
  arg10 = reinterpret_cast< meep::direction * >(argp10);
  res11 = SWIG_ConvertPtr(obj10,SWIG_as_voidptrptr(&arg11), 0, 0);
  if (!SWIG_IsOK(res11)) {
    SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "fields_process_dft_component" "', argument " "11"" of type '" "void *""'"); 
  }
  res12 = SWIG_ConvertPtr(obj11,SWIG_as_voidptrptr(&arg12), 0, 0);
  if (!SWIG_IsOK(res12)) {
    SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "fields_process_dft_component" "', argument " "12"" of type '" "void *""'"); 
  }
  {
    arg13 = static_cast<meep::component>(PyInteger_AsLong(obj12));
  }
  res14 = SWIG_ConvertPtr(obj13, &argp14,SWIGTYPE_p_bool, 0 |  0 );
  if (!SWIG_IsOK(res14)) {
    SWIG_exception_fail(SWIG_ArgError(res14), "in method '" "fields_process_dft_component" "', argument " "14"" of type '" "bool *""'"); 
  }
  arg14 = reinterpret_cast< bool * >(argp14);
  {
    try {
      result = (arg1)->process_dft_component(arg2,arg3,arg4,arg5,(char const *)arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
  return resultobj;
fail:
  if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_process_dft_component__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::dft_chunk **arg2 = (meep::dft_chunk **) 0 ;
  int arg3 ;
  int arg4 ;
  meep::component arg5 ;
  char *arg6 = (char *) 0 ;
  std::complex< meep::realnum > **arg7 = (std::complex< meep::realnum > **) 0 ;
  int *arg8 = (int *) 0 ;
  size_t *arg9 = (size_t *) 0 ;
  meep::direction *arg10 = (meep::direction *) 0 ;
  void *arg11 = (void *) 0 ;
  void *arg12 = (void *) 0 ;
  meep::component arg13 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int res6 ;
  char *buf6 = 0 ;
  int alloc6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  int res11 ;
  int res12 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_process_dft_component", 13, 13, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_process_dft_component" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_process_dft_component" "', argument " "2"" of type '" "meep::dft_chunk **""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk ** >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_process_dft_component" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_process_dft_component" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    arg5 = static_cast<meep::component>(PyInteger_AsLong(obj4));
  }
  res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_process_dft_component" "', argument " "6"" of type '" "char const *""'");
  }
  arg6 = reinterpret_cast< char * >(buf6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_process_dft_component" "', argument " "7"" of type '" "std::complex< meep::realnum > **""'"); 
  }
  arg7 = reinterpret_cast< std::complex< meep::realnum > ** >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_process_dft_component" "', argument " "8"" of type '" "int *""'"); 
  }
  arg8 = reinterpret_cast< int * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_process_dft_component" "', argument " "9"" of type '" "size_t *""'"); 
  }
  arg9 = reinterpret_cast< size_t * >(argp9);
  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_meep__direction, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "fields_process_dft_component" "', argument " "10"" of type '" "meep::direction *""'"); 
  }
  arg10 = reinterpret_cast< meep::direction * >(argp10);
  res11 = SWIG_ConvertPtr(obj10,SWIG_as_voidptrptr(&arg11), 0, 0);
  if (!SWIG_IsOK(res11)) {
    SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "fields_process_dft_component" "', argument " "11"" of type '" "void *""'"); 
  }
  res12 = SWIG_ConvertPtr(obj11,SWIG_as_voidptrptr(&arg12), 0, 0);
  if (!SWIG_IsOK(res12)) {
    SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "fields_process_dft_component" "', argument " "12"" of type '" "void *""'"); 
  }
  {
    arg13 = static_cast<meep::component>(PyInteger_AsLong(obj12));
  }
  {
    try {
      result = (arg1)->process_dft_component(arg2,arg3,arg4,arg5,(char const *)arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
  return resultobj;
fail:
  if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_process_dft_component__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::dft_chunk **arg2 = (meep::dft_chunk **) 0 ;
  int arg3 ;
  int arg4 ;
  meep::component arg5 ;
  char *arg6 = (char *) 0 ;
  std::complex< meep::realnum > **arg7 = (std::complex< meep::realnum > **) 0 ;
  int *arg8 = (int *) 0 ;
  size_t *arg9 = (size_t *) 0 ;
  meep::direction *arg10 = (meep::direction *) 0 ;
  void *arg11 = (void *) 0 ;
  void *arg12 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int res6 ;
  char *buf6 = 0 ;
  int alloc6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  int res11 ;
  int res12 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_process_dft_component", 12, 12, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_process_dft_component" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_process_dft_component" "', argument " "2"" of type '" "meep::dft_chunk **""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk ** >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_process_dft_component" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_process_dft_component" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    arg5 = static_cast<meep::component>(PyInteger_AsLong(obj4));
  }
  res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_process_dft_component" "', argument " "6"" of type '" "char const *""'");
  }
  arg6 = reinterpret_cast< char * >(buf6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_process_dft_component" "', argument " "7"" of type '" "std::complex< meep::realnum > **""'"); 
  }
  arg7 = reinterpret_cast< std::complex< meep::realnum > ** >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_process_dft_component" "', argument " "8"" of type '" "int *""'"); 
  }
  arg8 = reinterpret_cast< int * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_process_dft_component" "', argument " "9"" of type '" "size_t *""'"); 
  }
  arg9 = reinterpret_cast< size_t * >(argp9);
  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_meep__direction, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "fields_process_dft_component" "', argument " "10"" of type '" "meep::direction *""'"); 
  }
  arg10 = reinterpret_cast< meep::direction * >(argp10);
  res11 = SWIG_ConvertPtr(obj10,SWIG_as_voidptrptr(&arg11), 0, 0);
  if (!SWIG_IsOK(res11)) {
    SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "fields_process_dft_component" "', argument " "11"" of type '" "void *""'"); 
  }
  res12 = SWIG_ConvertPtr(obj11,SWIG_as_voidptrptr(&arg12), 0, 0);
  if (!SWIG_IsOK(res12)) {
    SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "fields_process_dft_component" "', argument " "12"" of type '" "void *""'"); 
  }
  {
    try {
      result = (arg1)->process_dft_component(arg2,arg3,arg4,arg5,(char const *)arg6,arg7,arg8,arg9,arg10,arg11,arg12);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
  return resultobj;
fail:
  if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_process_dft_component__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::dft_chunk **arg2 = (meep::dft_chunk **) 0 ;
  int arg3 ;
  int arg4 ;
  meep::component arg5 ;
  char *arg6 = (char *) 0 ;
  std::complex< meep::realnum > **arg7 = (std::complex< meep::realnum > **) 0 ;
  int *arg8 = (int *) 0 ;
  size_t *arg9 = (size_t *) 0 ;
  meep::direction *arg10 = (meep::direction *) 0 ;
  void *arg11 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int res6 ;
  char *buf6 = 0 ;
  int alloc6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  int res11 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_process_dft_component", 11, 11, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_process_dft_component" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_process_dft_component" "', argument " "2"" of type '" "meep::dft_chunk **""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk ** >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_process_dft_component" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_process_dft_component" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    arg5 = static_cast<meep::component>(PyInteger_AsLong(obj4));
  }
  res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_process_dft_component" "', argument " "6"" of type '" "char const *""'");
  }
  arg6 = reinterpret_cast< char * >(buf6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_process_dft_component" "', argument " "7"" of type '" "std::complex< meep::realnum > **""'"); 
  }
  arg7 = reinterpret_cast< std::complex< meep::realnum > ** >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_process_dft_component" "', argument " "8"" of type '" "int *""'"); 
  }
  arg8 = reinterpret_cast< int * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_process_dft_component" "', argument " "9"" of type '" "size_t *""'"); 
  }
  arg9 = reinterpret_cast< size_t * >(argp9);
  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_meep__direction, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "fields_process_dft_component" "', argument " "10"" of type '" "meep::direction *""'"); 
  }
  arg10 = reinterpret_cast< meep::direction * >(argp10);
  res11 = SWIG_ConvertPtr(obj10,SWIG_as_voidptrptr(&arg11), 0, 0);
  if (!SWIG_IsOK(res11)) {
    SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "fields_process_dft_component" "', argument " "11"" of type '" "void *""'"); 
  }
  {
    try {
      result = (arg1)->process_dft_component(arg2,arg3,arg4,arg5,(char const *)arg6,arg7,arg8,arg9,arg10,arg11);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
  return resultobj;
fail:
  if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_process_dft_component__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::dft_chunk **arg2 = (meep::dft_chunk **) 0 ;
  int arg3 ;
  int arg4 ;
  meep::component arg5 ;
  char *arg6 = (char *) 0 ;
  std::complex< meep::realnum > **arg7 = (std::complex< meep::realnum > **) 0 ;
  int *arg8 = (int *) 0 ;
  size_t *arg9 = (size_t *) 0 ;
  meep::direction *arg10 = (meep::direction *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int res6 ;
  char *buf6 = 0 ;
  int alloc6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_process_dft_component", 10, 10, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_process_dft_component" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_process_dft_component" "', argument " "2"" of type '" "meep::dft_chunk **""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk ** >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_process_dft_component" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_process_dft_component" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    arg5 = static_cast<meep::component>(PyInteger_AsLong(obj4));
  }
  res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_process_dft_component" "', argument " "6"" of type '" "char const *""'");
  }
  arg6 = reinterpret_cast< char * >(buf6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_process_dft_component" "', argument " "7"" of type '" "std::complex< meep::realnum > **""'"); 
  }
  arg7 = reinterpret_cast< std::complex< meep::realnum > ** >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_process_dft_component" "', argument " "8"" of type '" "int *""'"); 
  }
  arg8 = reinterpret_cast< int * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_process_dft_component" "', argument " "9"" of type '" "size_t *""'"); 
  }
  arg9 = reinterpret_cast< size_t * >(argp9);
  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_meep__direction, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "fields_process_dft_component" "', argument " "10"" of type '" "meep::direction *""'"); 
  }
  arg10 = reinterpret_cast< meep::direction * >(argp10);
  {
    try {
      result = (arg1)->process_dft_component(arg2,arg3,arg4,arg5,(char const *)arg6,arg7,arg8,arg9,arg10);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
  return resultobj;
fail:
  if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_process_dft_component__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::dft_chunk **arg2 = (meep::dft_chunk **) 0 ;
  int arg3 ;
  int arg4 ;
  meep::component arg5 ;
  char *arg6 = (char *) 0 ;
  std::complex< meep::realnum > **arg7 = (std::complex< meep::realnum > **) 0 ;
  int *arg8 = (int *) 0 ;
  size_t *arg9 = (size_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int res6 ;
  char *buf6 = 0 ;
  int alloc6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_process_dft_component", 9, 9, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_process_dft_component" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_process_dft_component" "', argument " "2"" of type '" "meep::dft_chunk **""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk ** >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_process_dft_component" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_process_dft_component" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    arg5 = static_cast<meep::component>(PyInteger_AsLong(obj4));
  }
  res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_process_dft_component" "', argument " "6"" of type '" "char const *""'");
  }
  arg6 = reinterpret_cast< char * >(buf6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_process_dft_component" "', argument " "7"" of type '" "std::complex< meep::realnum > **""'"); 
  }
  arg7 = reinterpret_cast< std::complex< meep::realnum > ** >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_process_dft_component" "', argument " "8"" of type '" "int *""'"); 
  }
  arg8 = reinterpret_cast< int * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_process_dft_component" "', argument " "9"" of type '" "size_t *""'"); 
  }
  arg9 = reinterpret_cast< size_t * >(argp9);
  {
    try {
      result = (arg1)->process_dft_component(arg2,arg3,arg4,arg5,(char const *)arg6,arg7,arg8,arg9);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
  return resultobj;
fail:
  if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_process_dft_component__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::dft_chunk **arg2 = (meep::dft_chunk **) 0 ;
  int arg3 ;
  int arg4 ;
  meep::component arg5 ;
  char *arg6 = (char *) 0 ;
  std::complex< meep::realnum > **arg7 = (std::complex< meep::realnum > **) 0 ;
  int *arg8 = (int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int res6 ;
  char *buf6 = 0 ;
  int alloc6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_process_dft_component", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_process_dft_component" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_process_dft_component" "', argument " "2"" of type '" "meep::dft_chunk **""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk ** >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_process_dft_component" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_process_dft_component" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    arg5 = static_cast<meep::component>(PyInteger_AsLong(obj4));
  }
  res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_process_dft_component" "', argument " "6"" of type '" "char const *""'");
  }
  arg6 = reinterpret_cast< char * >(buf6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_process_dft_component" "', argument " "7"" of type '" "std::complex< meep::realnum > **""'"); 
  }
  arg7 = reinterpret_cast< std::complex< meep::realnum > ** >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_process_dft_component" "', argument " "8"" of type '" "int *""'"); 
  }
  arg8 = reinterpret_cast< int * >(argp8);
  {
    try {
      result = (arg1)->process_dft_component(arg2,arg3,arg4,arg5,(char const *)arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
  return resultobj;
fail:
  if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_process_dft_component__SWIG_8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::dft_chunk **arg2 = (meep::dft_chunk **) 0 ;
  int arg3 ;
  int arg4 ;
  meep::component arg5 ;
  char *arg6 = (char *) 0 ;
  std::complex< meep::realnum > **arg7 = (std::complex< meep::realnum > **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int res6 ;
  char *buf6 = 0 ;
  int alloc6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_process_dft_component", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_process_dft_component" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_process_dft_component" "', argument " "2"" of type '" "meep::dft_chunk **""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk ** >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_process_dft_component" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_process_dft_component" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    arg5 = static_cast<meep::component>(PyInteger_AsLong(obj4));
  }
  res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_process_dft_component" "', argument " "6"" of type '" "char const *""'");
  }
  arg6 = reinterpret_cast< char * >(buf6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_process_dft_component" "', argument " "7"" of type '" "std::complex< meep::realnum > **""'"); 
  }
  arg7 = reinterpret_cast< std::complex< meep::realnum > ** >(argp7);
  {
    try {
      result = (arg1)->process_dft_component(arg2,arg3,arg4,arg5,(char const *)arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
  return resultobj;
fail:
  if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_process_dft_component__SWIG_9(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::dft_chunk **arg2 = (meep::dft_chunk **) 0 ;
  int arg3 ;
  int arg4 ;
  meep::component arg5 ;
  char *arg6 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int res6 ;
  char *buf6 = 0 ;
  int alloc6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_process_dft_component", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_process_dft_component" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_process_dft_component" "', argument " "2"" of type '" "meep::dft_chunk **""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk ** >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_process_dft_component" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_process_dft_component" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    arg5 = static_cast<meep::component>(PyInteger_AsLong(obj4));
  }
  res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_process_dft_component" "', argument " "6"" of type '" "char const *""'");
  }
  arg6 = reinterpret_cast< char * >(buf6);
  {
    try {
      result = (arg1)->process_dft_component(arg2,arg3,arg4,arg5,(char const *)arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
  return resultobj;
fail:
  if (alloc6 == SWIG_NEWOBJ) delete[] buf6;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_process_dft_component(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[16] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 15) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_p_meep__dft_chunk, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              _v = PyInteger_Check(argv[4]) && PyInteger_AsLong(argv[4]) < 100;
            }
            if (_v) {
              int res = SWIG_AsCharPtrAndSize(argv[5], 0, NULL, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                return _wrap_fields_process_dft_component__SWIG_9(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_p_meep__dft_chunk, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              _v = PyInteger_Check(argv[4]) && PyInteger_AsLong(argv[4]) < 100;
            }
            if (_v) {
              int res = SWIG_AsCharPtrAndSize(argv[5], 0, NULL, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_p_std__complexT_double_t, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  return _wrap_fields_process_dft_component__SWIG_8(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_p_meep__dft_chunk, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              _v = PyInteger_Check(argv[4]) && PyInteger_AsLong(argv[4]) < 100;
            }
            if (_v) {
              int res = SWIG_AsCharPtrAndSize(argv[5], 0, NULL, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_p_std__complexT_double_t, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_int, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    return _wrap_fields_process_dft_component__SWIG_7(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 9) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_p_meep__dft_chunk, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              _v = PyInteger_Check(argv[4]) && PyInteger_AsLong(argv[4]) < 100;
            }
            if (_v) {
              int res = SWIG_AsCharPtrAndSize(argv[5], 0, NULL, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_p_std__complexT_double_t, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_int, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_size_t, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      return _wrap_fields_process_dft_component__SWIG_6(self, args);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 10) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_p_meep__dft_chunk, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              _v = PyInteger_Check(argv[4]) && PyInteger_AsLong(argv[4]) < 100;
            }
            if (_v) {
              int res = SWIG_AsCharPtrAndSize(argv[5], 0, NULL, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_p_std__complexT_double_t, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_int, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_size_t, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      void *vptr = 0;
                      int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_meep__direction, 0);
                      _v = SWIG_CheckState(res);
                      if (_v) {
                        return _wrap_fields_process_dft_component__SWIG_5(self, args);
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 11) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_p_meep__dft_chunk, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              _v = PyInteger_Check(argv[4]) && PyInteger_AsLong(argv[4]) < 100;
            }
            if (_v) {
              int res = SWIG_AsCharPtrAndSize(argv[5], 0, NULL, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_p_std__complexT_double_t, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_int, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_size_t, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      void *vptr = 0;
                      int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_meep__direction, 0);
                      _v = SWIG_CheckState(res);
                      if (_v) {
                        void *ptr = 0;
                        int res = SWIG_ConvertPtr(argv[10], &ptr, 0, 0);
                        _v = SWIG_CheckState(res);
                        if (_v) {
                          return _wrap_fields_process_dft_component__SWIG_4(self, args);
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 12) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_p_meep__dft_chunk, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              _v = PyInteger_Check(argv[4]) && PyInteger_AsLong(argv[4]) < 100;
            }
            if (_v) {
              int res = SWIG_AsCharPtrAndSize(argv[5], 0, NULL, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_p_std__complexT_double_t, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_int, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_size_t, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      void *vptr = 0;
                      int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_meep__direction, 0);
                      _v = SWIG_CheckState(res);
                      if (_v) {
                        void *ptr = 0;
                        int res = SWIG_ConvertPtr(argv[10], &ptr, 0, 0);
                        _v = SWIG_CheckState(res);
                        if (_v) {
                          void *ptr = 0;
                          int res = SWIG_ConvertPtr(argv[11], &ptr, 0, 0);
                          _v = SWIG_CheckState(res);
                          if (_v) {
                            return _wrap_fields_process_dft_component__SWIG_3(self, args);
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 13) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_p_meep__dft_chunk, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              _v = PyInteger_Check(argv[4]) && PyInteger_AsLong(argv[4]) < 100;
            }
            if (_v) {
              int res = SWIG_AsCharPtrAndSize(argv[5], 0, NULL, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_p_std__complexT_double_t, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_int, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_size_t, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      void *vptr = 0;
                      int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_meep__direction, 0);
                      _v = SWIG_CheckState(res);
                      if (_v) {
                        void *ptr = 0;
                        int res = SWIG_ConvertPtr(argv[10], &ptr, 0, 0);
                        _v = SWIG_CheckState(res);
                        if (_v) {
                          void *ptr = 0;
                          int res = SWIG_ConvertPtr(argv[11], &ptr, 0, 0);
                          _v = SWIG_CheckState(res);
                          if (_v) {
                            {
                              _v = PyInteger_Check(argv[12]) && PyInteger_AsLong(argv[12]) < 100;
                            }
                            if (_v) {
                              return _wrap_fields_process_dft_component__SWIG_2(self, args);
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 14) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_p_meep__dft_chunk, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              _v = PyInteger_Check(argv[4]) && PyInteger_AsLong(argv[4]) < 100;
            }
            if (_v) {
              int res = SWIG_AsCharPtrAndSize(argv[5], 0, NULL, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_p_std__complexT_double_t, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_int, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_size_t, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      void *vptr = 0;
                      int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_meep__direction, 0);
                      _v = SWIG_CheckState(res);
                      if (_v) {
                        void *ptr = 0;
                        int res = SWIG_ConvertPtr(argv[10], &ptr, 0, 0);
                        _v = SWIG_CheckState(res);
                        if (_v) {
                          void *ptr = 0;
                          int res = SWIG_ConvertPtr(argv[11], &ptr, 0, 0);
                          _v = SWIG_CheckState(res);
                          if (_v) {
                            {
                              _v = PyInteger_Check(argv[12]) && PyInteger_AsLong(argv[12]) < 100;
                            }
                            if (_v) {
                              void *vptr = 0;
                              int res = SWIG_ConvertPtr(argv[13], &vptr, SWIGTYPE_p_bool, 0);
                              _v = SWIG_CheckState(res);
                              if (_v) {
                                return _wrap_fields_process_dft_component__SWIG_1(self, args);
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 15) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_p_meep__dft_chunk, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              _v = PyInteger_Check(argv[4]) && PyInteger_AsLong(argv[4]) < 100;
            }
            if (_v) {
              int res = SWIG_AsCharPtrAndSize(argv[5], 0, NULL, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_p_std__complexT_double_t, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_int, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_size_t, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      void *vptr = 0;
                      int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_meep__direction, 0);
                      _v = SWIG_CheckState(res);
                      if (_v) {
                        void *ptr = 0;
                        int res = SWIG_ConvertPtr(argv[10], &ptr, 0, 0);
                        _v = SWIG_CheckState(res);
                        if (_v) {
                          void *ptr = 0;
                          int res = SWIG_ConvertPtr(argv[11], &ptr, 0, 0);
                          _v = SWIG_CheckState(res);
                          if (_v) {
                            {
                              _v = PyInteger_Check(argv[12]) && PyInteger_AsLong(argv[12]) < 100;
                            }
                            if (_v) {
                              void *vptr = 0;
                              int res = SWIG_ConvertPtr(argv[13], &vptr, SWIGTYPE_p_bool, 0);
                              _v = SWIG_CheckState(res);
                              if (_v) {
                                {
                                  int res = SWIG_AsVal_bool(argv[14], NULL);
                                  _v = SWIG_CheckState(res);
                                }
                                if (_v) {
                                  return _wrap_fields_process_dft_component__SWIG_0(self, args);
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_process_dft_component'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::process_dft_component(meep::dft_chunk **,int,int,meep::component,char const *,std::complex< meep::realnum > **,int *,size_t *,meep::direction *,void *,void *,meep::component,bool *,bool)\n"
    "    meep::fields::process_dft_component(meep::dft_chunk **,int,int,meep::component,char const *,std::complex< meep::realnum > **,int *,size_t *,meep::direction *,void *,void *,meep::component,bool *)\n"
    "    meep::fields::process_dft_component(meep::dft_chunk **,int,int,meep::component,char const *,std::complex< meep::realnum > **,int *,size_t *,meep::direction *,void *,void *,meep::component)\n"
    "    meep::fields::process_dft_component(meep::dft_chunk **,int,int,meep::component,char const *,std::complex< meep::realnum > **,int *,size_t *,meep::direction *,void *,void *)\n"
    "    meep::fields::process_dft_component(meep::dft_chunk **,int,int,meep::component,char const *,std::complex< meep::realnum > **,int *,size_t *,meep::direction *,void *)\n"
    "    meep::fields::process_dft_component(meep::dft_chunk **,int,int,meep::component,char const *,std::complex< meep::realnum > **,int *,size_t *,meep::direction *)\n"
    "    meep::fields::process_dft_component(meep::dft_chunk **,int,int,meep::component,char const *,std::complex< meep::realnum > **,int *,size_t *)\n"
    "    meep::fields::process_dft_component(meep::dft_chunk **,int,int,meep::component,char const *,std::complex< meep::realnum > **,int *)\n"
    "    meep::fields::process_dft_component(meep::dft_chunk **,int,int,meep::component,char const *,std::complex< meep::realnum > **)\n"
    "    meep::fields::process_dft_component(meep::dft_chunk **,int,int,meep::component,char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_output_dft_components(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::dft_chunk **arg2 = (meep::dft_chunk **) 0 ;
  int arg3 ;
  SwigValueWrapper< meep::volume > arg4 ;
  char *arg5 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  int res5 ;
  char *buf5 = 0 ;
  int alloc5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_dft_components", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_dft_components" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_output_dft_components" "', argument " "2"" of type '" "meep::dft_chunk **""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk ** >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_output_dft_components" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_output_dft_components" "', argument " "4"" of type '" "meep::volume""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_dft_components" "', argument " "4"" of type '" "meep::volume""'");
    } else {
      meep::volume * temp = reinterpret_cast< meep::volume * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_output_dft_components" "', argument " "5"" of type '" "char const *""'");
  }
  arg5 = reinterpret_cast< char * >(buf5);
  {
    try {
      (arg1)->output_dft_components(arg2,arg3,arg4,(char const *)arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  return resultobj;
fail:
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_dft__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  SwigValueWrapper< meep::dft_flux > arg2 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_dft", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_flux,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_output_dft" "', argument " "2"" of type '" "meep::dft_flux""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_dft" "', argument " "2"" of type '" "meep::dft_flux""'");
    } else {
      meep::dft_flux * temp = reinterpret_cast< meep::dft_flux * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_output_dft" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try {
      (arg1)->output_dft(arg2,(char const *)arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_dft__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  SwigValueWrapper< meep::dft_force > arg2 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_dft", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_force,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_output_dft" "', argument " "2"" of type '" "meep::dft_force""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_dft" "', argument " "2"" of type '" "meep::dft_force""'");
    } else {
      meep::dft_force * temp = reinterpret_cast< meep::dft_force * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_output_dft" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try {
      (arg1)->output_dft(arg2,(char const *)arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_dft__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  SwigValueWrapper< meep::dft_near2far > arg2 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_dft", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_near2far,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_output_dft" "', argument " "2"" of type '" "meep::dft_near2far""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_dft" "', argument " "2"" of type '" "meep::dft_near2far""'");
    } else {
      meep::dft_near2far * temp = reinterpret_cast< meep::dft_near2far * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_output_dft" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try {
      (arg1)->output_dft(arg2,(char const *)arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_dft__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  SwigValueWrapper< meep::dft_fields > arg2 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_output_dft", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_output_dft" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_fields,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_output_dft" "', argument " "2"" of type '" "meep::dft_fields""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_output_dft" "', argument " "2"" of type '" "meep::dft_fields""'");
    } else {
      meep::dft_fields * temp = reinterpret_cast< meep::dft_fields * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_output_dft" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try {
      (arg1)->output_dft(arg2,(char const *)arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_output_dft(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_fields_output_dft__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__dft_force, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_fields_output_dft__SWIG_1(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__dft_near2far, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_fields_output_dft__SWIG_2(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__dft_fields, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_fields_output_dft__SWIG_3(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_output_dft'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::output_dft(meep::dft_flux,char const *)\n"
    "    meep::fields::output_dft(meep::dft_force,char const *)\n"
    "    meep::fields::output_dft(meep::dft_near2far,char const *)\n"
    "    meep::fields::output_dft(meep::dft_fields,char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_get_dft_array__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  SwigValueWrapper< meep::dft_flux > arg2 ;
  meep::component arg3 ;
  int arg4 ;
  int *arg5 = (int *) 0 ;
  size_t *arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  std::complex< meep::realnum > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_dft_array", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_dft_array" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_flux,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_dft_array" "', argument " "2"" of type '" "meep::dft_flux""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_dft_array" "', argument " "2"" of type '" "meep::dft_flux""'");
    } else {
      meep::dft_flux * temp = reinterpret_cast< meep::dft_flux * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    arg3 = static_cast<meep::component>(PyInteger_AsLong(obj2));
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_get_dft_array" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_get_dft_array" "', argument " "5"" of type '" "int *""'"); 
  }
  arg5 = reinterpret_cast< int * >(argp5);
  {
    arg6 = (size_t *)array_data(obj5);
  }
  {
    try {
      result = (std::complex< meep::realnum > *)(arg1)->get_dft_array(arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_dft_array__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  SwigValueWrapper< meep::dft_fields > arg2 ;
  meep::component arg3 ;
  int arg4 ;
  int *arg5 = (int *) 0 ;
  size_t *arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  std::complex< meep::realnum > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_dft_array", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_dft_array" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_fields,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_dft_array" "', argument " "2"" of type '" "meep::dft_fields""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_dft_array" "', argument " "2"" of type '" "meep::dft_fields""'");
    } else {
      meep::dft_fields * temp = reinterpret_cast< meep::dft_fields * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    arg3 = static_cast<meep::component>(PyInteger_AsLong(obj2));
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_get_dft_array" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_get_dft_array" "', argument " "5"" of type '" "int *""'"); 
  }
  arg5 = reinterpret_cast< int * >(argp5);
  {
    arg6 = (size_t *)array_data(obj5);
  }
  {
    try {
      result = (std::complex< meep::realnum > *)(arg1)->get_dft_array(arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_dft_array__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  SwigValueWrapper< meep::dft_force > arg2 ;
  meep::component arg3 ;
  int arg4 ;
  int *arg5 = (int *) 0 ;
  size_t *arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  std::complex< meep::realnum > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_dft_array", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_dft_array" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_force,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_dft_array" "', argument " "2"" of type '" "meep::dft_force""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_dft_array" "', argument " "2"" of type '" "meep::dft_force""'");
    } else {
      meep::dft_force * temp = reinterpret_cast< meep::dft_force * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    arg3 = static_cast<meep::component>(PyInteger_AsLong(obj2));
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_get_dft_array" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_get_dft_array" "', argument " "5"" of type '" "int *""'"); 
  }
  arg5 = reinterpret_cast< int * >(argp5);
  {
    arg6 = (size_t *)array_data(obj5);
  }
  {
    try {
      result = (std::complex< meep::realnum > *)(arg1)->get_dft_array(arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_dft_array__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  SwigValueWrapper< meep::dft_near2far > arg2 ;
  meep::component arg3 ;
  int arg4 ;
  int *arg5 = (int *) 0 ;
  size_t *arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  std::complex< meep::realnum > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_dft_array", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_dft_array" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_near2far,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_dft_array" "', argument " "2"" of type '" "meep::dft_near2far""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_dft_array" "', argument " "2"" of type '" "meep::dft_near2far""'");
    } else {
      meep::dft_near2far * temp = reinterpret_cast< meep::dft_near2far * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  {
    arg3 = static_cast<meep::component>(PyInteger_AsLong(obj2));
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_get_dft_array" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_get_dft_array" "', argument " "5"" of type '" "int *""'"); 
  }
  arg5 = reinterpret_cast< int * >(argp5);
  {
    arg6 = (size_t *)array_data(obj5);
  }
  {
    try {
      result = (std::complex< meep::realnum > *)(arg1)->get_dft_array(arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_dft_array(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[7] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PyInteger_Check(argv[2]) && PyInteger_AsLong(argv[2]) < 100;
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_int, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                _v = is_array(argv[5]);
              }
              if (_v) {
                return _wrap_fields_get_dft_array__SWIG_0(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__dft_fields, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PyInteger_Check(argv[2]) && PyInteger_AsLong(argv[2]) < 100;
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_int, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                _v = is_array(argv[5]);
              }
              if (_v) {
                return _wrap_fields_get_dft_array__SWIG_1(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__dft_force, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PyInteger_Check(argv[2]) && PyInteger_AsLong(argv[2]) < 100;
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_int, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                _v = is_array(argv[5]);
              }
              if (_v) {
                return _wrap_fields_get_dft_array__SWIG_2(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__dft_near2far, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PyInteger_Check(argv[2]) && PyInteger_AsLong(argv[2]) < 100;
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_int, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                _v = is_array(argv[5]);
              }
              if (_v) {
                return _wrap_fields_get_dft_array__SWIG_3(self, args);
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_get_dft_array'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::get_dft_array(meep::dft_flux,meep::component,int,int *,size_t [3])\n"
    "    meep::fields::get_dft_array(meep::dft_fields,meep::component,int,int *,size_t [3])\n"
    "    meep::fields::get_dft_array(meep::dft_force,meep::component,int,int *,size_t [3])\n"
    "    meep::fields::get_dft_array(meep::dft_near2far,meep::component,int,int *,size_t [3])\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_get_overlap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *arg2 = (void *) 0 ;
  void *arg3 = (void *) 0 ;
  SwigValueWrapper< meep::dft_flux > arg4 ;
  int arg5 ;
  std::complex< double > *arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  int res3 ;
  void *argp4 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_overlap", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_overlap" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_overlap" "', argument " "2"" of type '" "void *""'"); 
  }
  res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_overlap" "', argument " "3"" of type '" "void *""'"); 
  }
  {
    res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__dft_flux,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_get_overlap" "', argument " "4"" of type '" "meep::dft_flux""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_overlap" "', argument " "4"" of type '" "meep::dft_flux""'");
    } else {
      meep::dft_flux * temp = reinterpret_cast< meep::dft_flux * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_get_overlap" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_get_overlap" "', argument " "6"" of type '" "std::complex< double > [2]""'"); 
  } 
  arg6 = reinterpret_cast< std::complex< double > * >(argp6);
  {
    try {
      (arg1)->get_overlap(arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_mode_flux_overlap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *arg2 = (void *) 0 ;
  SwigValueWrapper< meep::dft_flux > arg3 ;
  int arg4 ;
  std::complex< double > *arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  void *argp3 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_mode_flux_overlap", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_mode_flux_overlap" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_mode_flux_overlap" "', argument " "2"" of type '" "void *""'"); 
  }
  {
    res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__dft_flux,  0  | 0);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_mode_flux_overlap" "', argument " "3"" of type '" "meep::dft_flux""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_mode_flux_overlap" "', argument " "3"" of type '" "meep::dft_flux""'");
    } else {
      meep::dft_flux * temp = reinterpret_cast< meep::dft_flux * >(argp3);
      arg3 = *temp;
      if (SWIG_IsNewObj(res3)) delete temp;
    }
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_get_mode_flux_overlap" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_get_mode_flux_overlap" "', argument " "5"" of type '" "std::complex< double > [2]""'"); 
  } 
  arg5 = reinterpret_cast< std::complex< double > * >(argp5);
  {
    try {
      (arg1)->get_mode_flux_overlap(arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_mode_mode_overlap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *arg2 = (void *) 0 ;
  void *arg3 = (void *) 0 ;
  SwigValueWrapper< meep::dft_flux > arg4 ;
  std::complex< double > *arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  int res3 ;
  void *argp4 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_mode_mode_overlap", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_mode_mode_overlap" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_mode_mode_overlap" "', argument " "2"" of type '" "void *""'"); 
  }
  res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_mode_mode_overlap" "', argument " "3"" of type '" "void *""'"); 
  }
  {
    res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__dft_flux,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_get_mode_mode_overlap" "', argument " "4"" of type '" "meep::dft_flux""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_mode_mode_overlap" "', argument " "4"" of type '" "meep::dft_flux""'");
    } else {
      meep::dft_flux * temp = reinterpret_cast< meep::dft_flux * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_get_mode_mode_overlap" "', argument " "5"" of type '" "std::complex< double > [2]""'"); 
  } 
  arg5 = reinterpret_cast< std::complex< double > * >(argp5);
  {
    try {
      (arg1)->get_mode_mode_overlap(arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_energy__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  double arg3 ;
  double arg4 ;
  int arg5 ;
  int arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  SwigValueWrapper< meep::dft_energy > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_energy", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_energy" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_energy" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_add_dft_energy" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_energy" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_energy" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_energy" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  {
    try {
      result = (arg1)->add_dft_energy((meep::volume_list const *)arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_energy(static_cast< const meep::dft_energy& >(result))), SWIGTYPE_p_meep__dft_energy, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_energy__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  double arg3 ;
  double arg4 ;
  int arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  SwigValueWrapper< meep::dft_energy > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_energy", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_energy" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_energy" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_add_dft_energy" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_energy" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_energy" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    try {
      result = (arg1)->add_dft_energy((meep::volume_list const *)arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_energy(static_cast< const meep::dft_energy& >(result))), SWIGTYPE_p_meep__dft_energy, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_energy__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  std::vector< double,std::allocator< double > > *arg3 = 0 ;
  int arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  SwigValueWrapper< meep::dft_energy > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_energy", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_energy" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_energy" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_energy" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_energy" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg3 = ptr;
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_energy" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    try {
      result = (arg1)->add_dft_energy((meep::volume_list const *)arg2,(std::vector< double,std::allocator< double > > const &)*arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_energy(static_cast< const meep::dft_energy& >(result))), SWIGTYPE_p_meep__dft_energy, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_energy__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  std::vector< double,std::allocator< double > > *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  SwigValueWrapper< meep::dft_energy > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_energy", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_energy" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_energy" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_energy" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_energy" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      result = (arg1)->add_dft_energy((meep::volume_list const *)arg2,(std::vector< double,std::allocator< double > > const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_energy(static_cast< const meep::dft_energy& >(result))), SWIGTYPE_p_meep__dft_energy, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_energy__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  double *arg3 = (double *) 0 ;
  size_t arg4 ;
  int arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  SwigValueWrapper< meep::dft_energy > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_energy", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_energy" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_energy" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_energy" "', argument " "3"" of type '" "double const *""'"); 
  }
  arg3 = reinterpret_cast< double * >(argp3);
  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_energy" "', argument " "4"" of type '" "size_t""'");
  } 
  arg4 = static_cast< size_t >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_energy" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    try {
      result = (arg1)->add_dft_energy((meep::volume_list const *)arg2,(double const *)arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_energy(static_cast< const meep::dft_energy& >(result))), SWIGTYPE_p_meep__dft_energy, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_energy__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  double *arg3 = (double *) 0 ;
  size_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  SwigValueWrapper< meep::dft_energy > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_energy", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_energy" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_energy" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_energy" "', argument " "3"" of type '" "double const *""'"); 
  }
  arg3 = reinterpret_cast< double * >(argp3);
  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_energy" "', argument " "4"" of type '" "size_t""'");
  } 
  arg4 = static_cast< size_t >(val4);
  {
    try {
      result = (arg1)->add_dft_energy((meep::volume_list const *)arg2,(double const *)arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_energy(static_cast< const meep::dft_energy& >(result))), SWIGTYPE_p_meep__dft_energy, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_energy(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[7] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< double,std::allocator< double > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_fields_add_dft_energy__SWIG_3(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_size_t(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_fields_add_dft_energy__SWIG_5(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< double,std::allocator< double > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_fields_add_dft_energy__SWIG_2(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_size_t(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_add_dft_energy__SWIG_4(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_add_dft_energy__SWIG_1(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_add_dft_energy__SWIG_0(self, args);
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_add_dft_energy'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::add_dft_energy(meep::volume_list const *,double,double,int,int)\n"
    "    meep::fields::add_dft_energy(meep::volume_list const *,double,double,int)\n"
    "    meep::fields::add_dft_energy(meep::volume_list const *,std::vector< double,std::allocator< double > > const &,int)\n"
    "    meep::fields::add_dft_energy(meep::volume_list const *,std::vector< double,std::allocator< double > > const &)\n"
    "    meep::fields::add_dft_energy(meep::volume_list const *,double const *,size_t,int)\n"
    "    meep::fields::add_dft_energy(meep::volume_list const *,double const *,size_t)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_force__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  double arg3 ;
  double arg4 ;
  int arg5 ;
  int arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  SwigValueWrapper< meep::dft_force > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_force", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_force" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_force" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_add_dft_force" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_force" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_force" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_force" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  {
    try {
      result = (arg1)->add_dft_force((meep::volume_list const *)arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_force(static_cast< const meep::dft_force& >(result))), SWIGTYPE_p_meep__dft_force, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_force__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  double arg3 ;
  double arg4 ;
  int arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  SwigValueWrapper< meep::dft_force > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_force", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_force" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_force" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_add_dft_force" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_force" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_force" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    try {
      result = (arg1)->add_dft_force((meep::volume_list const *)arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_force(static_cast< const meep::dft_force& >(result))), SWIGTYPE_p_meep__dft_force, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_force__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  std::vector< double,std::allocator< double > > *arg3 = 0 ;
  int arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  SwigValueWrapper< meep::dft_force > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_force", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_force" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_force" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_force" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_force" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg3 = ptr;
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_force" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    try {
      result = (arg1)->add_dft_force((meep::volume_list const *)arg2,(std::vector< double,std::allocator< double > > const &)*arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_force(static_cast< const meep::dft_force& >(result))), SWIGTYPE_p_meep__dft_force, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_force__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  std::vector< double,std::allocator< double > > *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  SwigValueWrapper< meep::dft_force > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_force", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_force" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_force" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_force" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_force" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      result = (arg1)->add_dft_force((meep::volume_list const *)arg2,(std::vector< double,std::allocator< double > > const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_force(static_cast< const meep::dft_force& >(result))), SWIGTYPE_p_meep__dft_force, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_force__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  double *arg3 = (double *) 0 ;
  size_t arg4 ;
  int arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  SwigValueWrapper< meep::dft_force > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_force", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_force" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_force" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_force" "', argument " "3"" of type '" "double const *""'"); 
  }
  arg3 = reinterpret_cast< double * >(argp3);
  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_force" "', argument " "4"" of type '" "size_t""'");
  } 
  arg4 = static_cast< size_t >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_force" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    try {
      result = (arg1)->add_dft_force((meep::volume_list const *)arg2,(double const *)arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_force(static_cast< const meep::dft_force& >(result))), SWIGTYPE_p_meep__dft_force, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_force__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  double *arg3 = (double *) 0 ;
  size_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  SwigValueWrapper< meep::dft_force > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_force", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_force" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_force" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_force" "', argument " "3"" of type '" "double const *""'"); 
  }
  arg3 = reinterpret_cast< double * >(argp3);
  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_force" "', argument " "4"" of type '" "size_t""'");
  } 
  arg4 = static_cast< size_t >(val4);
  {
    try {
      result = (arg1)->add_dft_force((meep::volume_list const *)arg2,(double const *)arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_force(static_cast< const meep::dft_force& >(result))), SWIGTYPE_p_meep__dft_force, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_force(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[7] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< double,std::allocator< double > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_fields_add_dft_force__SWIG_3(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_size_t(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_fields_add_dft_force__SWIG_5(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< double,std::allocator< double > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_fields_add_dft_force__SWIG_2(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_size_t(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_add_dft_force__SWIG_4(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_add_dft_force__SWIG_1(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_add_dft_force__SWIG_0(self, args);
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_add_dft_force'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::add_dft_force(meep::volume_list const *,double,double,int,int)\n"
    "    meep::fields::add_dft_force(meep::volume_list const *,double,double,int)\n"
    "    meep::fields::add_dft_force(meep::volume_list const *,std::vector< double,std::allocator< double > > const &,int)\n"
    "    meep::fields::add_dft_force(meep::volume_list const *,std::vector< double,std::allocator< double > > const &)\n"
    "    meep::fields::add_dft_force(meep::volume_list const *,double const *,size_t,int)\n"
    "    meep::fields::add_dft_force(meep::volume_list const *,double const *,size_t)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_near2far__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  double arg3 ;
  double arg4 ;
  int arg5 ;
  int arg6 ;
  int arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  SwigValueWrapper< meep::dft_near2far > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_near2far", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_near2far" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_near2far" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_add_dft_near2far" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_near2far" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_near2far" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_near2far" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_int(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_add_dft_near2far" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  {
    try {
      result = (arg1)->add_dft_near2far((meep::volume_list const *)arg2,arg3,arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_near2far(static_cast< const meep::dft_near2far& >(result))), SWIGTYPE_p_meep__dft_near2far, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_near2far__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  double arg3 ;
  double arg4 ;
  int arg5 ;
  int arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  SwigValueWrapper< meep::dft_near2far > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_near2far", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_near2far" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_near2far" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_add_dft_near2far" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_near2far" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_near2far" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_near2far" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  {
    try {
      result = (arg1)->add_dft_near2far((meep::volume_list const *)arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_near2far(static_cast< const meep::dft_near2far& >(result))), SWIGTYPE_p_meep__dft_near2far, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_near2far__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  double arg3 ;
  double arg4 ;
  int arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  SwigValueWrapper< meep::dft_near2far > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_near2far", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_near2far" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_near2far" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_add_dft_near2far" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_near2far" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_near2far" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    try {
      result = (arg1)->add_dft_near2far((meep::volume_list const *)arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_near2far(static_cast< const meep::dft_near2far& >(result))), SWIGTYPE_p_meep__dft_near2far, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_near2far__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  std::vector< double,std::allocator< double > > *arg3 = 0 ;
  int arg4 ;
  int arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  SwigValueWrapper< meep::dft_near2far > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_near2far", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_near2far" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_near2far" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_near2far" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_near2far" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg3 = ptr;
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_near2far" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_near2far" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    try {
      result = (arg1)->add_dft_near2far((meep::volume_list const *)arg2,(std::vector< double,std::allocator< double > > const &)*arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_near2far(static_cast< const meep::dft_near2far& >(result))), SWIGTYPE_p_meep__dft_near2far, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_near2far__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  std::vector< double,std::allocator< double > > *arg3 = 0 ;
  int arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  SwigValueWrapper< meep::dft_near2far > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_near2far", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_near2far" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_near2far" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_near2far" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_near2far" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg3 = ptr;
  }
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_near2far" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    try {
      result = (arg1)->add_dft_near2far((meep::volume_list const *)arg2,(std::vector< double,std::allocator< double > > const &)*arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_near2far(static_cast< const meep::dft_near2far& >(result))), SWIGTYPE_p_meep__dft_near2far, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_near2far__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  std::vector< double,std::allocator< double > > *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  SwigValueWrapper< meep::dft_near2far > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_near2far", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_near2far" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_near2far" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  {
    std::vector< double,std::allocator< double > > *ptr = (std::vector< double,std::allocator< double > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_near2far" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_dft_near2far" "', argument " "3"" of type '" "std::vector< double,std::allocator< double > > const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      result = (arg1)->add_dft_near2far((meep::volume_list const *)arg2,(std::vector< double,std::allocator< double > > const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_near2far(static_cast< const meep::dft_near2far& >(result))), SWIGTYPE_p_meep__dft_near2far, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_near2far__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  double *arg3 = (double *) 0 ;
  size_t arg4 ;
  int arg5 ;
  int arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  SwigValueWrapper< meep::dft_near2far > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_near2far", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_near2far" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_near2far" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_near2far" "', argument " "3"" of type '" "double const *""'"); 
  }
  arg3 = reinterpret_cast< double * >(argp3);
  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_near2far" "', argument " "4"" of type '" "size_t""'");
  } 
  arg4 = static_cast< size_t >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_near2far" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_add_dft_near2far" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  {
    try {
      result = (arg1)->add_dft_near2far((meep::volume_list const *)arg2,(double const *)arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_near2far(static_cast< const meep::dft_near2far& >(result))), SWIGTYPE_p_meep__dft_near2far, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_near2far__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  double *arg3 = (double *) 0 ;
  size_t arg4 ;
  int arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  SwigValueWrapper< meep::dft_near2far > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_near2far", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_near2far" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_near2far" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_near2far" "', argument " "3"" of type '" "double const *""'"); 
  }
  arg3 = reinterpret_cast< double * >(argp3);
  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_near2far" "', argument " "4"" of type '" "size_t""'");
  } 
  arg4 = static_cast< size_t >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_add_dft_near2far" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    try {
      result = (arg1)->add_dft_near2far((meep::volume_list const *)arg2,(double const *)arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_near2far(static_cast< const meep::dft_near2far& >(result))), SWIGTYPE_p_meep__dft_near2far, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_near2far__SWIG_8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume_list *arg2 = (meep::volume_list *) 0 ;
  double *arg3 = (double *) 0 ;
  size_t arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  size_t val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  SwigValueWrapper< meep::dft_near2far > result;
  
  if (!PyArg_UnpackTuple(args, "fields_add_dft_near2far", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_dft_near2far" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__volume_list, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_dft_near2far" "', argument " "2"" of type '" "meep::volume_list const *""'"); 
  }
  arg2 = reinterpret_cast< meep::volume_list * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_dft_near2far" "', argument " "3"" of type '" "double const *""'"); 
  }
  arg3 = reinterpret_cast< double * >(argp3);
  ecode4 = SWIG_AsVal_size_t(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_add_dft_near2far" "', argument " "4"" of type '" "size_t""'");
  } 
  arg4 = static_cast< size_t >(val4);
  {
    try {
      result = (arg1)->add_dft_near2far((meep::volume_list const *)arg2,(double const *)arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::dft_near2far(static_cast< const meep::dft_near2far& >(result))), SWIGTYPE_p_meep__dft_near2far, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_dft_near2far(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[8] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 7) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< double,std::allocator< double > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_fields_add_dft_near2far__SWIG_5(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_size_t(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_fields_add_dft_near2far__SWIG_8(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< double,std::allocator< double > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_fields_add_dft_near2far__SWIG_4(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_size_t(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_add_dft_near2far__SWIG_7(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_add_dft_near2far__SWIG_2(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< double,std::allocator< double > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_add_dft_near2far__SWIG_3(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_size_t(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_add_dft_near2far__SWIG_6(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_add_dft_near2far__SWIG_1(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__volume_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_int(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_fields_add_dft_near2far__SWIG_0(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_add_dft_near2far'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::add_dft_near2far(meep::volume_list const *,double,double,int,int,int)\n"
    "    meep::fields::add_dft_near2far(meep::volume_list const *,double,double,int,int)\n"
    "    meep::fields::add_dft_near2far(meep::volume_list const *,double,double,int)\n"
    "    meep::fields::add_dft_near2far(meep::volume_list const *,std::vector< double,std::allocator< double > > const &,int,int)\n"
    "    meep::fields::add_dft_near2far(meep::volume_list const *,std::vector< double,std::allocator< double > > const &,int)\n"
    "    meep::fields::add_dft_near2far(meep::volume_list const *,std::vector< double,std::allocator< double > > const &)\n"
    "    meep::fields::add_dft_near2far(meep::volume_list const *,double const *,size_t,int,int)\n"
    "    meep::fields::add_dft_near2far(meep::volume_list const *,double const *,size_t,int)\n"
    "    meep::fields::add_dft_near2far(meep::volume_list const *,double const *,size_t)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_get_chi1inv__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  meep::vec *arg4 = 0 ;
  double arg5 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_chi1inv", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_chi1inv" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_get_chi1inv" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_get_chi1inv" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_chi1inv" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::vec * >(argp4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_get_chi1inv" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_get_chi1inv" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      result = ((meep::fields const *)arg1)->get_chi1inv(arg2,arg3,(meep::vec const &)*arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_chi1inv__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  meep::vec *arg4 = 0 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_chi1inv", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_chi1inv" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_get_chi1inv" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_get_chi1inv" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_chi1inv" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::vec * >(argp4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_get_chi1inv" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      result = ((meep::fields const *)arg1)->get_chi1inv(arg2,arg3,(meep::vec const &)*arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_chi1inv__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  meep::vec *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_chi1inv", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_chi1inv" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_get_chi1inv" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_get_chi1inv" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_chi1inv" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::vec * >(argp4);
  {
    try {
      result = ((meep::fields const *)arg1)->get_chi1inv(arg2,arg3,(meep::vec const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_inveps__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  meep::vec *arg4 = 0 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_inveps", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_inveps" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_get_inveps" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_get_inveps" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_inveps" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::vec * >(argp4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_get_inveps" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      result = ((meep::fields const *)arg1)->get_inveps(arg2,arg3,(meep::vec const &)*arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_inveps__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  meep::vec *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_inveps", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_inveps" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_get_inveps" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_get_inveps" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_inveps" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::vec * >(argp4);
  {
    try {
      result = ((meep::fields const *)arg1)->get_inveps(arg2,arg3,(meep::vec const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_inveps(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_fields_get_inveps__SWIG_1(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_get_inveps__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_get_inveps'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::get_inveps(meep::component,meep::direction,meep::vec const &,double) const\n"
    "    meep::fields::get_inveps(meep::component,meep::direction,meep::vec const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_get_eps__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::vec *arg2 = 0 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_eps", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_eps" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_eps" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eps" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_get_eps" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      result = ((meep::fields const *)arg1)->get_eps((meep::vec const &)*arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_eps__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_eps", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_eps" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_eps" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_eps" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = ((meep::fields const *)arg1)->get_eps((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_eps(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_fields_get_eps__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_fields_get_eps__SWIG_0(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_get_eps'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::get_eps(meep::vec const &,double) const\n"
    "    meep::fields::get_eps(meep::vec const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_get_mu__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::vec *arg2 = 0 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_mu", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_mu" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_mu" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_mu" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_get_mu" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      result = ((meep::fields const *)arg1)->get_mu((meep::vec const &)*arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_mu__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_mu", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_mu" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_mu" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_mu" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = ((meep::fields const *)arg1)->get_mu((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_mu(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_fields_get_mu__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_fields_get_mu__SWIG_0(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_get_mu'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::get_mu(meep::vec const &,double) const\n"
    "    meep::fields::get_mu(meep::vec const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_get_point(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::monitor_point *arg2 = (meep::monitor_point *) 0 ;
  meep::vec *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_point", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_point" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__monitor_point, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_point" "', argument " "2"" of type '" "meep::monitor_point *""'"); 
  }
  arg2 = reinterpret_cast< meep::monitor_point * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_point" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_point" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  {
    try {
      ((meep::fields const *)arg1)->get_point(arg2,(meep::vec const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_new_point__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::vec *arg2 = 0 ;
  meep::monitor_point *arg3 = (meep::monitor_point *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::monitor_point *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_new_point", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_new_point" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_new_point" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_new_point" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__monitor_point, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_new_point" "', argument " "3"" of type '" "meep::monitor_point *""'"); 
  }
  arg3 = reinterpret_cast< meep::monitor_point * >(argp3);
  {
    try {
      result = (meep::monitor_point *)((meep::fields const *)arg1)->get_new_point((meep::vec const &)*arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__monitor_point, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_new_point__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::vec *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::monitor_point *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_new_point", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_new_point" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_new_point" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_new_point" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    try {
      result = (meep::monitor_point *)((meep::fields const *)arg1)->get_new_point((meep::vec const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__monitor_point, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_new_point(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_fields_get_new_point__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__monitor_point, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_fields_get_new_point__SWIG_0(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_get_new_point'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::get_new_point(meep::vec const &,meep::monitor_point *) const\n"
    "    meep::fields::get_new_point(meep::vec const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_get_field__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  int arg2 ;
  meep::vec *arg3 = 0 ;
  bool arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_field", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_field" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_get_field" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_field" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_field" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_get_field" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  {
    try {
      result = ((meep::fields const *)arg1)->get_field(arg2,(meep::vec const &)*arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_field__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  int arg2 ;
  meep::vec *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_field", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_field" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_get_field" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_field" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_field" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  {
    try {
      result = ((meep::fields const *)arg1)->get_field(arg2,(meep::vec const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_field__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::vec *arg3 = 0 ;
  bool arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_field", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_field" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_field" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_field" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_get_field" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  {
    try {
      result = ((meep::fields const *)arg1)->get_field(arg2,(meep::vec const &)*arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_field_from_comp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::vec *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_field_from_comp", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_field_from_comp" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_field_from_comp" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_field_from_comp" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  {
    try {
      result = ((meep::fields const *)arg1)->get_field(arg2,(meep::vec const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_field__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::derived_component arg2 ;
  meep::vec *arg3 = 0 ;
  bool arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_field", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_field" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::derived_component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_field" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_field" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_get_field" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  {
    try {
      result = (double)((meep::fields const *)arg1)->get_field(arg2,(meep::vec const &)*arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_field__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::derived_component arg2 ;
  meep::vec *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_field", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_field" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::derived_component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_field" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_field" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  {
    try {
      result = (double)((meep::fields const *)arg1)->get_field(arg2,(meep::vec const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_dft_monitor_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  SwigValueWrapper< meep::dft_fields > arg2 ;
  meep::volume *arg3 = 0 ;
  meep::component arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  std::vector< size_t,std::allocator< size_t > > result;
  
  if (!PyArg_UnpackTuple(args, "fields_dft_monitor_size", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_dft_monitor_size" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_fields,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_dft_monitor_size" "', argument " "2"" of type '" "meep::dft_fields""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_dft_monitor_size" "', argument " "2"" of type '" "meep::dft_fields""'");
    } else {
      meep::dft_fields * temp = reinterpret_cast< meep::dft_fields * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_dft_monitor_size" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_dft_monitor_size" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    arg4 = static_cast<meep::component>(PyInteger_AsLong(obj3));
  }
  {
    try {
      result = (arg1)->dft_monitor_size(arg2,(meep::volume const &)*arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = swig::from(static_cast< std::vector< size_t,std::allocator< size_t > > >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_dft_component_dims__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::dft_chunk **arg2 = (meep::dft_chunk **) 0 ;
  int arg3 ;
  meep::component arg4 ;
  meep::ivec *arg5 = 0 ;
  meep::ivec *arg6 = 0 ;
  size_t *arg7 = 0 ;
  size_t *arg8 = 0 ;
  int *arg9 = 0 ;
  meep::direction *arg10 = (meep::direction *) 0 ;
  size_t *arg11 = (size_t *) 0 ;
  int *arg12 = (int *) 0 ;
  size_t *arg13 = (size_t *) 0 ;
  meep::direction *arg14 = (meep::direction *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  void *argp11 = 0 ;
  int res11 = 0 ;
  void *argp12 = 0 ;
  int res12 = 0 ;
  void *argp13 = 0 ;
  int res13 = 0 ;
  void *argp14 = 0 ;
  int res14 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_dft_component_dims", 14, 14, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_dft_component_dims" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_dft_component_dims" "', argument " "2"" of type '" "meep::dft_chunk **""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk ** >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_get_dft_component_dims" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    arg4 = static_cast<meep::component>(PyInteger_AsLong(obj3));
  }
  res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__ivec,  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_get_dft_component_dims" "', argument " "5"" of type '" "meep::ivec &""'"); 
  }
  if (!argp5) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_dft_component_dims" "', argument " "5"" of type '" "meep::ivec &""'"); 
  }
  arg5 = reinterpret_cast< meep::ivec * >(argp5);
  res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_meep__ivec,  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_get_dft_component_dims" "', argument " "6"" of type '" "meep::ivec &""'"); 
  }
  if (!argp6) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_dft_component_dims" "', argument " "6"" of type '" "meep::ivec &""'"); 
  }
  arg6 = reinterpret_cast< meep::ivec * >(argp6);
  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_size_t,  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_get_dft_component_dims" "', argument " "7"" of type '" "size_t &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_dft_component_dims" "', argument " "7"" of type '" "size_t &""'"); 
  }
  arg7 = reinterpret_cast< size_t * >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8, SWIGTYPE_p_size_t,  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_get_dft_component_dims" "', argument " "8"" of type '" "size_t &""'"); 
  }
  if (!argp8) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_dft_component_dims" "', argument " "8"" of type '" "size_t &""'"); 
  }
  arg8 = reinterpret_cast< size_t * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9, SWIGTYPE_p_int,  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_get_dft_component_dims" "', argument " "9"" of type '" "int &""'"); 
  }
  if (!argp9) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_dft_component_dims" "', argument " "9"" of type '" "int &""'"); 
  }
  arg9 = reinterpret_cast< int * >(argp9);
  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_meep__direction, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "fields_get_dft_component_dims" "', argument " "10"" of type '" "meep::direction *""'"); 
  }
  arg10 = reinterpret_cast< meep::direction * >(argp10);
  res11 = SWIG_ConvertPtr(obj10, &argp11,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res11)) {
    SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "fields_get_dft_component_dims" "', argument " "11"" of type '" "size_t *""'"); 
  }
  arg11 = reinterpret_cast< size_t * >(argp11);
  res12 = SWIG_ConvertPtr(obj11, &argp12,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res12)) {
    SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "fields_get_dft_component_dims" "', argument " "12"" of type '" "int *""'"); 
  }
  arg12 = reinterpret_cast< int * >(argp12);
  res13 = SWIG_ConvertPtr(obj12, &argp13,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res13)) {
    SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "fields_get_dft_component_dims" "', argument " "13"" of type '" "size_t *""'"); 
  }
  arg13 = reinterpret_cast< size_t * >(argp13);
  res14 = SWIG_ConvertPtr(obj13, &argp14,SWIGTYPE_p_meep__direction, 0 |  0 );
  if (!SWIG_IsOK(res14)) {
    SWIG_exception_fail(SWIG_ArgError(res14), "in method '" "fields_get_dft_component_dims" "', argument " "14"" of type '" "meep::direction *""'"); 
  }
  arg14 = reinterpret_cast< meep::direction * >(argp14);
  {
    try {
      (arg1)->get_dft_component_dims(arg2,arg3,arg4,*arg5,*arg6,*arg7,*arg8,*arg9,arg10,arg11,arg12,arg13,arg14);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_dft_component_dims__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::dft_chunk **arg2 = (meep::dft_chunk **) 0 ;
  int arg3 ;
  meep::component arg4 ;
  meep::ivec *arg5 = 0 ;
  meep::ivec *arg6 = 0 ;
  size_t *arg7 = 0 ;
  size_t *arg8 = 0 ;
  int *arg9 = 0 ;
  meep::direction *arg10 = (meep::direction *) 0 ;
  size_t *arg11 = (size_t *) 0 ;
  int *arg12 = (int *) 0 ;
  size_t *arg13 = (size_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  void *argp11 = 0 ;
  int res11 = 0 ;
  void *argp12 = 0 ;
  int res12 = 0 ;
  void *argp13 = 0 ;
  int res13 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_dft_component_dims", 13, 13, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_dft_component_dims" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_dft_component_dims" "', argument " "2"" of type '" "meep::dft_chunk **""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk ** >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_get_dft_component_dims" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    arg4 = static_cast<meep::component>(PyInteger_AsLong(obj3));
  }
  res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__ivec,  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_get_dft_component_dims" "', argument " "5"" of type '" "meep::ivec &""'"); 
  }
  if (!argp5) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_dft_component_dims" "', argument " "5"" of type '" "meep::ivec &""'"); 
  }
  arg5 = reinterpret_cast< meep::ivec * >(argp5);
  res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_meep__ivec,  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_get_dft_component_dims" "', argument " "6"" of type '" "meep::ivec &""'"); 
  }
  if (!argp6) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_dft_component_dims" "', argument " "6"" of type '" "meep::ivec &""'"); 
  }
  arg6 = reinterpret_cast< meep::ivec * >(argp6);
  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_size_t,  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_get_dft_component_dims" "', argument " "7"" of type '" "size_t &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_dft_component_dims" "', argument " "7"" of type '" "size_t &""'"); 
  }
  arg7 = reinterpret_cast< size_t * >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8, SWIGTYPE_p_size_t,  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_get_dft_component_dims" "', argument " "8"" of type '" "size_t &""'"); 
  }
  if (!argp8) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_dft_component_dims" "', argument " "8"" of type '" "size_t &""'"); 
  }
  arg8 = reinterpret_cast< size_t * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9, SWIGTYPE_p_int,  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_get_dft_component_dims" "', argument " "9"" of type '" "int &""'"); 
  }
  if (!argp9) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_dft_component_dims" "', argument " "9"" of type '" "int &""'"); 
  }
  arg9 = reinterpret_cast< int * >(argp9);
  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_meep__direction, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "fields_get_dft_component_dims" "', argument " "10"" of type '" "meep::direction *""'"); 
  }
  arg10 = reinterpret_cast< meep::direction * >(argp10);
  res11 = SWIG_ConvertPtr(obj10, &argp11,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res11)) {
    SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "fields_get_dft_component_dims" "', argument " "11"" of type '" "size_t *""'"); 
  }
  arg11 = reinterpret_cast< size_t * >(argp11);
  res12 = SWIG_ConvertPtr(obj11, &argp12,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res12)) {
    SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "fields_get_dft_component_dims" "', argument " "12"" of type '" "int *""'"); 
  }
  arg12 = reinterpret_cast< int * >(argp12);
  res13 = SWIG_ConvertPtr(obj12, &argp13,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res13)) {
    SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "fields_get_dft_component_dims" "', argument " "13"" of type '" "size_t *""'"); 
  }
  arg13 = reinterpret_cast< size_t * >(argp13);
  {
    try {
      (arg1)->get_dft_component_dims(arg2,arg3,arg4,*arg5,*arg6,*arg7,*arg8,*arg9,arg10,arg11,arg12,arg13);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_dft_component_dims__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::dft_chunk **arg2 = (meep::dft_chunk **) 0 ;
  int arg3 ;
  meep::component arg4 ;
  meep::ivec *arg5 = 0 ;
  meep::ivec *arg6 = 0 ;
  size_t *arg7 = 0 ;
  size_t *arg8 = 0 ;
  int *arg9 = 0 ;
  meep::direction *arg10 = (meep::direction *) 0 ;
  size_t *arg11 = (size_t *) 0 ;
  int *arg12 = (int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  void *argp11 = 0 ;
  int res11 = 0 ;
  void *argp12 = 0 ;
  int res12 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_dft_component_dims", 12, 12, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_dft_component_dims" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_dft_component_dims" "', argument " "2"" of type '" "meep::dft_chunk **""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk ** >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_get_dft_component_dims" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    arg4 = static_cast<meep::component>(PyInteger_AsLong(obj3));
  }
  res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__ivec,  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_get_dft_component_dims" "', argument " "5"" of type '" "meep::ivec &""'"); 
  }
  if (!argp5) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_dft_component_dims" "', argument " "5"" of type '" "meep::ivec &""'"); 
  }
  arg5 = reinterpret_cast< meep::ivec * >(argp5);
  res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_meep__ivec,  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_get_dft_component_dims" "', argument " "6"" of type '" "meep::ivec &""'"); 
  }
  if (!argp6) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_dft_component_dims" "', argument " "6"" of type '" "meep::ivec &""'"); 
  }
  arg6 = reinterpret_cast< meep::ivec * >(argp6);
  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_size_t,  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_get_dft_component_dims" "', argument " "7"" of type '" "size_t &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_dft_component_dims" "', argument " "7"" of type '" "size_t &""'"); 
  }
  arg7 = reinterpret_cast< size_t * >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8, SWIGTYPE_p_size_t,  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_get_dft_component_dims" "', argument " "8"" of type '" "size_t &""'"); 
  }
  if (!argp8) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_dft_component_dims" "', argument " "8"" of type '" "size_t &""'"); 
  }
  arg8 = reinterpret_cast< size_t * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9, SWIGTYPE_p_int,  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_get_dft_component_dims" "', argument " "9"" of type '" "int &""'"); 
  }
  if (!argp9) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_dft_component_dims" "', argument " "9"" of type '" "int &""'"); 
  }
  arg9 = reinterpret_cast< int * >(argp9);
  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_meep__direction, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "fields_get_dft_component_dims" "', argument " "10"" of type '" "meep::direction *""'"); 
  }
  arg10 = reinterpret_cast< meep::direction * >(argp10);
  res11 = SWIG_ConvertPtr(obj10, &argp11,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res11)) {
    SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "fields_get_dft_component_dims" "', argument " "11"" of type '" "size_t *""'"); 
  }
  arg11 = reinterpret_cast< size_t * >(argp11);
  res12 = SWIG_ConvertPtr(obj11, &argp12,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res12)) {
    SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "fields_get_dft_component_dims" "', argument " "12"" of type '" "int *""'"); 
  }
  arg12 = reinterpret_cast< int * >(argp12);
  {
    try {
      (arg1)->get_dft_component_dims(arg2,arg3,arg4,*arg5,*arg6,*arg7,*arg8,*arg9,arg10,arg11,arg12);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_dft_component_dims__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::dft_chunk **arg2 = (meep::dft_chunk **) 0 ;
  int arg3 ;
  meep::component arg4 ;
  meep::ivec *arg5 = 0 ;
  meep::ivec *arg6 = 0 ;
  size_t *arg7 = 0 ;
  size_t *arg8 = 0 ;
  int *arg9 = 0 ;
  meep::direction *arg10 = (meep::direction *) 0 ;
  size_t *arg11 = (size_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  void *argp11 = 0 ;
  int res11 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_get_dft_component_dims", 11, 11, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_dft_component_dims" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_meep__dft_chunk, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_get_dft_component_dims" "', argument " "2"" of type '" "meep::dft_chunk **""'"); 
  }
  arg2 = reinterpret_cast< meep::dft_chunk ** >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_get_dft_component_dims" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    arg4 = static_cast<meep::component>(PyInteger_AsLong(obj3));
  }
  res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__ivec,  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fields_get_dft_component_dims" "', argument " "5"" of type '" "meep::ivec &""'"); 
  }
  if (!argp5) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_dft_component_dims" "', argument " "5"" of type '" "meep::ivec &""'"); 
  }
  arg5 = reinterpret_cast< meep::ivec * >(argp5);
  res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_meep__ivec,  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fields_get_dft_component_dims" "', argument " "6"" of type '" "meep::ivec &""'"); 
  }
  if (!argp6) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_dft_component_dims" "', argument " "6"" of type '" "meep::ivec &""'"); 
  }
  arg6 = reinterpret_cast< meep::ivec * >(argp6);
  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_size_t,  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fields_get_dft_component_dims" "', argument " "7"" of type '" "size_t &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_dft_component_dims" "', argument " "7"" of type '" "size_t &""'"); 
  }
  arg7 = reinterpret_cast< size_t * >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8, SWIGTYPE_p_size_t,  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_get_dft_component_dims" "', argument " "8"" of type '" "size_t &""'"); 
  }
  if (!argp8) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_dft_component_dims" "', argument " "8"" of type '" "size_t &""'"); 
  }
  arg8 = reinterpret_cast< size_t * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9, SWIGTYPE_p_int,  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fields_get_dft_component_dims" "', argument " "9"" of type '" "int &""'"); 
  }
  if (!argp9) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_dft_component_dims" "', argument " "9"" of type '" "int &""'"); 
  }
  arg9 = reinterpret_cast< int * >(argp9);
  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_meep__direction, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "fields_get_dft_component_dims" "', argument " "10"" of type '" "meep::direction *""'"); 
  }
  arg10 = reinterpret_cast< meep::direction * >(argp10);
  res11 = SWIG_ConvertPtr(obj10, &argp11,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res11)) {
    SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "fields_get_dft_component_dims" "', argument " "11"" of type '" "size_t *""'"); 
  }
  arg11 = reinterpret_cast< size_t * >(argp11);
  {
    try {
      (arg1)->get_dft_component_dims(arg2,arg3,arg4,*arg5,*arg6,*arg7,*arg8,*arg9,arg10,arg11);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_dft_component_dims(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[15] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 14) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 11) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_p_meep__dft_chunk, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            _v = PyInteger_Check(argv[3]) && PyInteger_AsLong(argv[3]) < 100;
          }
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL);
            _v = SWIG_CheckState(res);
            if (_v) {
              void *vptr = 0;
              int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL);
              _v = SWIG_CheckState(res);
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_size_t, SWIG_POINTER_NO_NULL);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_size_t, SWIG_POINTER_NO_NULL);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_int, SWIG_POINTER_NO_NULL);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      void *vptr = 0;
                      int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_meep__direction, 0);
                      _v = SWIG_CheckState(res);
                      if (_v) {
                        void *vptr = 0;
                        int res = SWIG_ConvertPtr(argv[10], &vptr, SWIGTYPE_p_size_t, 0);
                        _v = SWIG_CheckState(res);
                        if (_v) {
                          return _wrap_fields_get_dft_component_dims__SWIG_3(self, args);
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 12) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_p_meep__dft_chunk, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            _v = PyInteger_Check(argv[3]) && PyInteger_AsLong(argv[3]) < 100;
          }
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL);
            _v = SWIG_CheckState(res);
            if (_v) {
              void *vptr = 0;
              int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL);
              _v = SWIG_CheckState(res);
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_size_t, SWIG_POINTER_NO_NULL);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_size_t, SWIG_POINTER_NO_NULL);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_int, SWIG_POINTER_NO_NULL);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      void *vptr = 0;
                      int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_meep__direction, 0);
                      _v = SWIG_CheckState(res);
                      if (_v) {
                        void *vptr = 0;
                        int res = SWIG_ConvertPtr(argv[10], &vptr, SWIGTYPE_p_size_t, 0);
                        _v = SWIG_CheckState(res);
                        if (_v) {
                          void *vptr = 0;
                          int res = SWIG_ConvertPtr(argv[11], &vptr, SWIGTYPE_p_int, 0);
                          _v = SWIG_CheckState(res);
                          if (_v) {
                            return _wrap_fields_get_dft_component_dims__SWIG_2(self, args);
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 13) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_p_meep__dft_chunk, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            _v = PyInteger_Check(argv[3]) && PyInteger_AsLong(argv[3]) < 100;
          }
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL);
            _v = SWIG_CheckState(res);
            if (_v) {
              void *vptr = 0;
              int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL);
              _v = SWIG_CheckState(res);
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_size_t, SWIG_POINTER_NO_NULL);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_size_t, SWIG_POINTER_NO_NULL);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_int, SWIG_POINTER_NO_NULL);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      void *vptr = 0;
                      int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_meep__direction, 0);
                      _v = SWIG_CheckState(res);
                      if (_v) {
                        void *vptr = 0;
                        int res = SWIG_ConvertPtr(argv[10], &vptr, SWIGTYPE_p_size_t, 0);
                        _v = SWIG_CheckState(res);
                        if (_v) {
                          void *vptr = 0;
                          int res = SWIG_ConvertPtr(argv[11], &vptr, SWIGTYPE_p_int, 0);
                          _v = SWIG_CheckState(res);
                          if (_v) {
                            void *vptr = 0;
                            int res = SWIG_ConvertPtr(argv[12], &vptr, SWIGTYPE_p_size_t, 0);
                            _v = SWIG_CheckState(res);
                            if (_v) {
                              return _wrap_fields_get_dft_component_dims__SWIG_1(self, args);
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 14) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_p_meep__dft_chunk, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            _v = PyInteger_Check(argv[3]) && PyInteger_AsLong(argv[3]) < 100;
          }
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL);
            _v = SWIG_CheckState(res);
            if (_v) {
              void *vptr = 0;
              int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL);
              _v = SWIG_CheckState(res);
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_size_t, SWIG_POINTER_NO_NULL);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_size_t, SWIG_POINTER_NO_NULL);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_int, SWIG_POINTER_NO_NULL);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      void *vptr = 0;
                      int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_meep__direction, 0);
                      _v = SWIG_CheckState(res);
                      if (_v) {
                        void *vptr = 0;
                        int res = SWIG_ConvertPtr(argv[10], &vptr, SWIGTYPE_p_size_t, 0);
                        _v = SWIG_CheckState(res);
                        if (_v) {
                          void *vptr = 0;
                          int res = SWIG_ConvertPtr(argv[11], &vptr, SWIGTYPE_p_int, 0);
                          _v = SWIG_CheckState(res);
                          if (_v) {
                            void *vptr = 0;
                            int res = SWIG_ConvertPtr(argv[12], &vptr, SWIGTYPE_p_size_t, 0);
                            _v = SWIG_CheckState(res);
                            if (_v) {
                              void *vptr = 0;
                              int res = SWIG_ConvertPtr(argv[13], &vptr, SWIGTYPE_p_meep__direction, 0);
                              _v = SWIG_CheckState(res);
                              if (_v) {
                                return _wrap_fields_get_dft_component_dims__SWIG_0(self, args);
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_get_dft_component_dims'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::get_dft_component_dims(meep::dft_chunk **,int,meep::component,meep::ivec &,meep::ivec &,size_t &,size_t &,int &,meep::direction *,size_t *,int *,size_t *,meep::direction *)\n"
    "    meep::fields::get_dft_component_dims(meep::dft_chunk **,int,meep::component,meep::ivec &,meep::ivec &,size_t &,size_t &,int &,meep::direction *,size_t *,int *,size_t *)\n"
    "    meep::fields::get_dft_component_dims(meep::dft_chunk **,int,meep::component,meep::ivec &,meep::ivec &,size_t &,size_t &,int &,meep::direction *,size_t *,int *)\n"
    "    meep::fields::get_dft_component_dims(meep::dft_chunk **,int,meep::component,meep::ivec &,meep::ivec &,size_t &,size_t &,int &,meep::direction *,size_t *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_synchronize_magnetic_fields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_synchronize_magnetic_fields", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_synchronize_magnetic_fields" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      (arg1)->synchronize_magnetic_fields();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_restore_magnetic_fields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_restore_magnetic_fields", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_restore_magnetic_fields" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      (arg1)->restore_magnetic_fields();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_energy_in_box(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_energy_in_box", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_energy_in_box" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_energy_in_box" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_energy_in_box" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    try {
      result = (double)(arg1)->energy_in_box((meep::volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_electric_energy_in_box(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_electric_energy_in_box", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_electric_energy_in_box" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_electric_energy_in_box" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_electric_energy_in_box" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    try {
      result = (double)(arg1)->electric_energy_in_box((meep::volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_magnetic_energy_in_box(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_magnetic_energy_in_box", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_magnetic_energy_in_box" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_magnetic_energy_in_box" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_magnetic_energy_in_box" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    try {
      result = (double)(arg1)->magnetic_energy_in_box((meep::volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_thermo_energy_in_box(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_thermo_energy_in_box", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_thermo_energy_in_box" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_thermo_energy_in_box" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_thermo_energy_in_box" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    try {
      result = (double)(arg1)->thermo_energy_in_box((meep::volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_total_energy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_total_energy", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_total_energy" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      result = (double)(arg1)->total_energy();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_field_energy_in_box__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_field_energy_in_box", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_field_energy_in_box" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_field_energy_in_box" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_field_energy_in_box" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    try {
      result = (double)(arg1)->field_energy_in_box((meep::volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_field_energy_in_box__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::volume *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_field_energy_in_box", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_field_energy_in_box" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_field_energy_in_box" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_field_energy_in_box" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    try {
      result = (double)(arg1)->field_energy_in_box(arg2,(meep::volume const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_field_energy_in_box(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_fields_field_energy_in_box__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_fields_field_energy_in_box__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_field_energy_in_box'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::field_energy_in_box(meep::volume const &)\n"
    "    meep::fields::field_energy_in_box(meep::component,meep::volume const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_field_energy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_field_energy", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_field_energy" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      result = (double)(arg1)->field_energy();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_flux_in_box_wrongH(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_flux_in_box_wrongH", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_flux_in_box_wrongH" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_flux_in_box_wrongH" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_flux_in_box_wrongH" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_flux_in_box_wrongH" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    try {
      result = (double)(arg1)->flux_in_box_wrongH(arg2,(meep::volume const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_flux_in_box(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_flux_in_box", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_flux_in_box" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_flux_in_box" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_flux_in_box" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_flux_in_box" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    try {
      result = (double)(arg1)->flux_in_box(arg2,(meep::volume const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_flux_vol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::flux_vol *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_flux_vol", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_flux_vol" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_add_flux_vol" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_flux_vol" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_flux_vol" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    try {
      result = (meep::flux_vol *)(arg1)->add_flux_vol(arg2,(meep::volume const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__flux_vol, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_flux_plane__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::flux_vol *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_flux_plane", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_flux_plane" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_flux_plane" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_flux_plane" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    try {
      result = (meep::flux_vol *)(arg1)->add_flux_plane((meep::volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__flux_vol, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_flux_plane__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::vec *arg2 = 0 ;
  meep::vec *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::flux_vol *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_add_flux_plane", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_add_flux_plane" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_add_flux_plane" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_flux_plane" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_add_flux_plane" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_add_flux_plane" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  {
    try {
      result = (meep::flux_vol *)(arg1)->add_flux_plane((meep::vec const &)*arg2,(meep::vec const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__flux_vol, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_add_flux_plane(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_fields_add_flux_plane__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_fields_add_flux_plane__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_add_flux_plane'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::add_flux_plane(meep::volume const &)\n"
    "    meep::fields::add_flux_plane(meep::vec const &,meep::vec const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_electric_energy_max_in_box(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_electric_energy_max_in_box", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_electric_energy_max_in_box" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_electric_energy_max_in_box" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_electric_energy_max_in_box" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    try {
      result = (double)(arg1)->electric_energy_max_in_box((meep::volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_modal_volume_in_box(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_modal_volume_in_box", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_modal_volume_in_box" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_modal_volume_in_box" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_modal_volume_in_box" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    try {
      result = (double)(arg1)->modal_volume_in_box((meep::volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_electric_sqr_weighted_integral(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ;
  meep::volume *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_electric_sqr_weighted_integral", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_electric_sqr_weighted_integral" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    if (obj1 == Py_None) {
      arg2 = NULL;
      py_callback = NULL;
    } else {
      arg2 = py_callback_wrap;
      py_callback = obj1;
      Py_INCREF(py_callback);
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_electric_sqr_weighted_integral" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_electric_sqr_weighted_integral" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    try {
      result = (double)(arg1)->electric_sqr_weighted_integral(arg2,(meep::volume const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  {
    Py_XDECREF(py_callback);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_callback);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_electric_energy_weighted_integral(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double (*arg2)(meep::vec const &) = (double (*)(meep::vec const &)) 0 ;
  meep::volume *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_electric_energy_weighted_integral", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_electric_energy_weighted_integral" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    if (obj1 == Py_None) {
      arg2 = NULL;
      py_callback = NULL;
    } else {
      arg2 = py_callback_wrap;
      py_callback = obj1;
      Py_INCREF(py_callback);
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_electric_energy_weighted_integral" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_electric_energy_weighted_integral" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    try {
      result = (double)(arg1)->electric_energy_weighted_integral(arg2,(meep::volume const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  {
    Py_XDECREF(py_callback);
  }
  return resultobj;
fail:
  {
    Py_XDECREF(py_callback);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_set_output_directory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_set_output_directory", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_set_output_directory" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_set_output_directory" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try {
      (arg1)->set_output_directory((char const *)arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_count_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_count_volume", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_count_volume" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    try {
      result = (double)(arg1)->count_volume(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_have_component(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "fields_have_component", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_have_component" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    try {
      result = (bool)(arg1)->have_component(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_max_eps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fields_max_eps", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_max_eps" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      result = (double)((meep::fields const *)arg1)->max_eps();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_step_boundaries(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::field_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_step_boundaries", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_step_boundaries" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_step_boundaries" "', argument " "2"" of type '" "meep::field_type""'");
  } 
  arg2 = static_cast< meep::field_type >(val2);
  {
    try {
      (arg1)->step_boundaries(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_process_incoming_chunk_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::field_type arg2 ;
  meep::chunk_pair *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_process_incoming_chunk_data", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_process_incoming_chunk_data" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_process_incoming_chunk_data" "', argument " "2"" of type '" "meep::field_type""'");
  } 
  arg2 = static_cast< meep::field_type >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__pairT_int_int_t,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_process_incoming_chunk_data" "', argument " "3"" of type '" "meep::chunk_pair const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_process_incoming_chunk_data" "', argument " "3"" of type '" "meep::chunk_pair const &""'"); 
  }
  arg3 = reinterpret_cast< meep::chunk_pair * >(argp3);
  {
    try {
      (arg1)->process_incoming_chunk_data(arg2,(meep::chunk_pair const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_nosize_direction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "fields_nosize_direction", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_nosize_direction" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_nosize_direction" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  {
    try {
      result = (bool)((meep::fields const *)arg1)->nosize_direction(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_normal_direction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::direction result;
  
  if (!PyArg_UnpackTuple(args, "fields_normal_direction", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_normal_direction" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_normal_direction" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_normal_direction" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    try {
      result = (meep::direction)((meep::fields const *)arg1)->normal_direction((meep::volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_casimir_stress_dct_integral__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::direction arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  meep::field_type arg7 ;
  SwigValueWrapper< meep::volume > arg8 ;
  bool arg9 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  void *argp8 ;
  int res8 = 0 ;
  bool val9 ;
  int ecode9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_casimir_stress_dct_integral", 9, 9, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_casimir_stress_dct_integral" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_casimir_stress_dct_integral" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_casimir_stress_dct_integral" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_casimir_stress_dct_integral" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_casimir_stress_dct_integral" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_casimir_stress_dct_integral" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_int(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_casimir_stress_dct_integral" "', argument " "7"" of type '" "meep::field_type""'");
  } 
  arg7 = static_cast< meep::field_type >(val7);
  {
    res8 = SWIG_ConvertPtr(obj7, &argp8, SWIGTYPE_p_meep__volume,  0  | 0);
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_casimir_stress_dct_integral" "', argument " "8"" of type '" "meep::volume""'"); 
    }  
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_casimir_stress_dct_integral" "', argument " "8"" of type '" "meep::volume""'");
    } else {
      meep::volume * temp = reinterpret_cast< meep::volume * >(argp8);
      arg8 = *temp;
      if (SWIG_IsNewObj(res8)) delete temp;
    }
  }
  ecode9 = SWIG_AsVal_bool(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fields_casimir_stress_dct_integral" "', argument " "9"" of type '" "bool""'");
  } 
  arg9 = static_cast< bool >(val9);
  {
    try {
      result = (arg1)->casimir_stress_dct_integral(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_casimir_stress_dct_integral__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::direction arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  meep::field_type arg7 ;
  SwigValueWrapper< meep::volume > arg8 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  void *argp8 ;
  int res8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_casimir_stress_dct_integral", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_casimir_stress_dct_integral" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_casimir_stress_dct_integral" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_casimir_stress_dct_integral" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_casimir_stress_dct_integral" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_casimir_stress_dct_integral" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_casimir_stress_dct_integral" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_int(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fields_casimir_stress_dct_integral" "', argument " "7"" of type '" "meep::field_type""'");
  } 
  arg7 = static_cast< meep::field_type >(val7);
  {
    res8 = SWIG_ConvertPtr(obj7, &argp8, SWIGTYPE_p_meep__volume,  0  | 0);
    if (!SWIG_IsOK(res8)) {
      SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fields_casimir_stress_dct_integral" "', argument " "8"" of type '" "meep::volume""'"); 
    }  
    if (!argp8) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_casimir_stress_dct_integral" "', argument " "8"" of type '" "meep::volume""'");
    } else {
      meep::volume * temp = reinterpret_cast< meep::volume * >(argp8);
      arg8 = *temp;
      if (SWIG_IsNewObj(res8)) delete temp;
    }
  }
  {
    try {
      result = (arg1)->casimir_stress_dct_integral(arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_casimir_stress_dct_integral(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[10] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 9) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 8) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_int(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  int res = SWIG_ConvertPtr(argv[7], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    return _wrap_fields_casimir_stress_dct_integral__SWIG_1(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 9) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_int(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  int res = SWIG_ConvertPtr(argv[7], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    {
                      int res = SWIG_AsVal_bool(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      return _wrap_fields_casimir_stress_dct_integral__SWIG_0(self, args);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_casimir_stress_dct_integral'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::casimir_stress_dct_integral(meep::direction,meep::direction,double,double,double,meep::field_type,meep::volume,bool)\n"
    "    meep::fields::casimir_stress_dct_integral(meep::direction,meep::direction,double,double,double,meep::field_type,meep::volume)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_set_solve_cw_omega(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  std::complex< double > arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::complex< double > val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_set_solve_cw_omega", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_set_solve_cw_omega" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_set_solve_cw_omega" "', argument " "2"" of type '" "std::complex< double >""'");
  } 
  arg2 = static_cast< std::complex< double > >(val2);
  {
    try {
      (arg1)->set_solve_cw_omega(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_unset_solve_cw_omega(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_unset_solve_cw_omega", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_unset_solve_cw_omega" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      (arg1)->unset_solve_cw_omega();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_field__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::ivec *arg3 = 0 ;
  bool arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_field", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_field" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_field" "', argument " "3"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_field" "', argument " "3"" of type '" "meep::ivec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::ivec * >(argp3);
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fields_get_field" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  {
    try {
      result = ((meep::fields const *)arg1)->get_field(arg2,(meep::ivec const &)*arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_field__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::ivec *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_field", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_field" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_get_field" "', argument " "3"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_field" "', argument " "3"" of type '" "meep::ivec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::ivec * >(argp3);
  {
    try {
      result = ((meep::fields const *)arg1)->get_field(arg2,(meep::ivec const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_field(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) >= 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_fields_get_field__SWIG_4(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_fields_get_field__SWIG_6(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_fields_get_field__SWIG_1(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) >= 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_fields_get_field__SWIG_3(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_fields_get_field__SWIG_5(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_fields_get_field__SWIG_2(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_fields_get_field__SWIG_0(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_get_field'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::get_field(int,meep::vec const &,bool) const\n"
    "    meep::fields::get_field(int,meep::vec const &) const\n"
    "    meep::fields::get_field(meep::component,meep::vec const &,bool) const\n"
    "    meep::fields::get_field(meep::derived_component,meep::vec const &,bool) const\n"
    "    meep::fields::get_field(meep::derived_component,meep::vec const &) const\n"
    "    meep::fields::get_field(meep::component,meep::ivec const &,bool) const\n"
    "    meep::fields::get_field(meep::component,meep::ivec const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_get_chi1inv__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  meep::ivec *arg4 = 0 ;
  double arg5 ;
  bool arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_chi1inv", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_chi1inv" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_get_chi1inv" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_get_chi1inv" "', argument " "4"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_chi1inv" "', argument " "4"" of type '" "meep::ivec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::ivec * >(argp4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_get_chi1inv" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_bool(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fields_get_chi1inv" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  {
    try {
      result = ((meep::fields const *)arg1)->get_chi1inv(arg2,arg3,(meep::ivec const &)*arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_chi1inv__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  meep::ivec *arg4 = 0 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_chi1inv", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_chi1inv" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_get_chi1inv" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_get_chi1inv" "', argument " "4"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_chi1inv" "', argument " "4"" of type '" "meep::ivec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::ivec * >(argp4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fields_get_chi1inv" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      result = ((meep::fields const *)arg1)->get_chi1inv(arg2,arg3,(meep::ivec const &)*arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_chi1inv__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component arg2 ;
  meep::direction arg3 ;
  meep::ivec *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_chi1inv", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_chi1inv" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_get_chi1inv" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__ivec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_get_chi1inv" "', argument " "4"" of type '" "meep::ivec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fields_get_chi1inv" "', argument " "4"" of type '" "meep::ivec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::ivec * >(argp4);
  {
    try {
      result = ((meep::fields const *)arg1)->get_chi1inv(arg2,arg3,(meep::ivec const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_chi1inv(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[7] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_fields_get_chi1inv__SWIG_2(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_fields_get_chi1inv__SWIG_5(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_get_chi1inv__SWIG_4(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_fields_get_chi1inv__SWIG_1(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__vec, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_get_chi1inv__SWIG_0(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyInteger_Check(argv[1]) && PyInteger_AsLong(argv[1]) < 100;
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_bool(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_fields_get_chi1inv__SWIG_3(self, args);
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'fields_get_chi1inv'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::fields::get_chi1inv(meep::component,meep::direction,meep::vec const &,double,bool) const\n"
    "    meep::fields::get_chi1inv(meep::component,meep::direction,meep::vec const &,double) const\n"
    "    meep::fields::get_chi1inv(meep::component,meep::direction,meep::vec const &) const\n"
    "    meep::fields::get_chi1inv(meep::component,meep::direction,meep::ivec const &,double,bool) const\n"
    "    meep::fields::get_chi1inv(meep::component,meep::direction,meep::ivec const &,double) const\n"
    "    meep::fields::get_chi1inv(meep::component,meep::direction,meep::ivec const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fields_locate_component_point(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::component *arg2 = (meep::component *) 0 ;
  meep::ivec *arg3 = (meep::ivec *) 0 ;
  std::complex< double > *arg4 = (std::complex< double > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "fields_locate_component_point", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_locate_component_point" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__component, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fields_locate_component_point" "', argument " "2"" of type '" "meep::component *""'"); 
  }
  arg2 = reinterpret_cast< meep::component * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__ivec, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fields_locate_component_point" "', argument " "3"" of type '" "meep::ivec *""'"); 
  }
  arg3 = reinterpret_cast< meep::ivec * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fields_locate_component_point" "', argument " "4"" of type '" "std::complex< double > *""'"); 
  }
  arg4 = reinterpret_cast< std::complex< double > * >(argp4);
  {
    try {
      result = (bool)((meep::fields const *)arg1)->locate_component_point(arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_am_now_working_on(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::time_sink arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_am_now_working_on", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_am_now_working_on" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_am_now_working_on" "', argument " "2"" of type '" "meep::time_sink""'");
  } 
  arg2 = static_cast< meep::time_sink >(val2);
  {
    try {
      (arg1)->am_now_working_on(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_finished_working(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_finished_working", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_finished_working" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      (arg1)->finished_working();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_get_timing_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::unordered_map< meep::time_sink,std::vector< double,std::allocator< double > >,std::hash< int > > result;
  
  if (!PyArg_UnpackTuple(args, "fields_get_timing_data", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_get_timing_data" "', argument " "1"" of type '" "meep::fields const *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      result = ((meep::fields const *)arg1)->get_timing_data();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    PyObject *out_dict = PyDict_New();
    for (const auto& ts_vec : result) {
      const std::vector<double>& timing_vector = ts_vec.second;
      PyObject *res = PyList_New(timing_vector.size());
      for (size_t i = 0; i < timing_vector.size(); ++i) {
        PyList_SetItem(res, i, PyFloat_FromDouble(timing_vector[i]));
      }
      PyObject *key = PyInteger_FromLong(static_cast<int>(ts_vec.first));
      PyDict_SetItem(out_dict, key, res);
      
      Py_DECREF(key);
      Py_DECREF(res);
    }
    resultobj = out_dict;
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_reset_timers(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fields_reset_timers", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_reset_timers" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    try {
      (arg1)->reset_timers();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fields_is_periodic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::boundary_side arg2 ;
  meep::direction arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "fields_is_periodic", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fields_is_periodic" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fields_is_periodic" "', argument " "2"" of type '" "meep::boundary_side""'");
  } 
  arg2 = static_cast< meep::boundary_side >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fields_is_periodic" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  {
    try {
      result = (bool)meep_fields_is_periodic(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *fields_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__fields, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *fields_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_flux_vol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::direction arg2 ;
  meep::volume *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::flux_vol *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_flux_vol", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_flux_vol" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_flux_vol" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_flux_vol" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_flux_vol" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    try {
      result = (meep::flux_vol *)new meep::flux_vol(arg1,arg2,(meep::volume const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__flux_vol, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_flux_vol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::flux_vol *arg1 = (meep::flux_vol *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_flux_vol", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__flux_vol, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_flux_vol" "', argument " "1"" of type '" "meep::flux_vol *""'"); 
  }
  arg1 = reinterpret_cast< meep::flux_vol * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_flux_vol_update_half(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::flux_vol *arg1 = (meep::flux_vol *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "flux_vol_update_half", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__flux_vol, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_vol_update_half" "', argument " "1"" of type '" "meep::flux_vol *""'"); 
  }
  arg1 = reinterpret_cast< meep::flux_vol * >(argp1);
  {
    try {
      (arg1)->update_half();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_flux_vol_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::flux_vol *arg1 = (meep::flux_vol *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "flux_vol_update", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__flux_vol, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_vol_update" "', argument " "1"" of type '" "meep::flux_vol *""'"); 
  }
  arg1 = reinterpret_cast< meep::flux_vol * >(argp1);
  {
    try {
      (arg1)->update();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_flux_vol_flux(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::flux_vol *arg1 = (meep::flux_vol *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "flux_vol_flux", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__flux_vol, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_vol_flux" "', argument " "1"" of type '" "meep::flux_vol *""'"); 
  }
  arg1 = reinterpret_cast< meep::flux_vol * >(argp1);
  {
    try {
      result = (double)(arg1)->flux();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_flux_vol_next_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::flux_vol *arg1 = (meep::flux_vol *) 0 ;
  meep::flux_vol *arg2 = (meep::flux_vol *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "flux_vol_next_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__flux_vol, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_vol_next_set" "', argument " "1"" of type '" "meep::flux_vol *""'"); 
  }
  arg1 = reinterpret_cast< meep::flux_vol * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__flux_vol, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "flux_vol_next_set" "', argument " "2"" of type '" "meep::flux_vol *""'"); 
  }
  arg2 = reinterpret_cast< meep::flux_vol * >(argp2);
  if (arg1) (arg1)->next = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_flux_vol_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::flux_vol *arg1 = (meep::flux_vol *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::flux_vol *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "flux_vol_next_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__flux_vol, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flux_vol_next_get" "', argument " "1"" of type '" "meep::flux_vol *""'"); 
  }
  arg1 = reinterpret_cast< meep::flux_vol * >(argp1);
  result = (meep::flux_vol *) ((arg1)->next);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__flux_vol, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *flux_vol_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__flux_vol, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *flux_vol_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_make_output_directory__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "make_output_directory", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "make_output_directory" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "make_output_directory" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try {
      result = (char *)meep::make_output_directory((char const *)arg1,(char const *)arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  delete[] result;
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_make_output_directory__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "make_output_directory", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "make_output_directory" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    try {
      result = (char *)meep::make_output_directory((char const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  delete[] result;
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_make_output_directory__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "make_output_directory", 0, 0)) SWIG_fail;
  {
    try {
      result = (char *)meep::make_output_directory();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  delete[] result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_make_output_directory(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_make_output_directory__SWIG_2(self, args);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_make_output_directory__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_make_output_directory__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'make_output_directory'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::make_output_directory(char const *,char const *)\n"
    "    meep::make_output_directory(char const *)\n"
    "    meep::make_output_directory()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_trash_output_directory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "trash_output_directory", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "trash_output_directory" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    try {
      meep::trash_output_directory((char const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_directory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_directory", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_directory" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    try {
      meep::delete_directory((char const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_create_output_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  FILE *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "create_output_file", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "create_output_file" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "create_output_file" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try {
      result = (FILE *)meep::create_output_file((char const *)arg1,(char const *)arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FILE, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_do_harminv__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< double > *arg1 = (std::complex< double > *) 0 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  std::complex< double > *arg7 = (std::complex< double > *) 0 ;
  double *arg8 = (double *) 0 ;
  double *arg9 = (double *) 0 ;
  double *arg10 = (double *) 0 ;
  double arg11 ;
  double arg12 ;
  double arg13 ;
  double arg14 ;
  double arg15 ;
  double arg16 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  double val11 ;
  int ecode11 = 0 ;
  double val12 ;
  int ecode12 = 0 ;
  double val13 ;
  int ecode13 = 0 ;
  double val14 ;
  int ecode14 = 0 ;
  double val15 ;
  int ecode15 = 0 ;
  double val16 ;
  int ecode16 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  PyObject * obj14 = 0 ;
  PyObject * obj15 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "do_harminv", 16, 16, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13, &obj14, &obj15)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "do_harminv" "', argument " "1"" of type '" "std::complex< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::complex< double > * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "do_harminv" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "do_harminv" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "do_harminv" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "do_harminv" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "do_harminv" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "do_harminv" "', argument " "7"" of type '" "std::complex< double > *""'"); 
  }
  arg7 = reinterpret_cast< std::complex< double > * >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "do_harminv" "', argument " "8"" of type '" "double *""'"); 
  }
  arg8 = reinterpret_cast< double * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "do_harminv" "', argument " "9"" of type '" "double *""'"); 
  }
  arg9 = reinterpret_cast< double * >(argp9);
  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "do_harminv" "', argument " "10"" of type '" "double *""'"); 
  }
  arg10 = reinterpret_cast< double * >(argp10);
  ecode11 = SWIG_AsVal_double(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "do_harminv" "', argument " "11"" of type '" "double""'");
  } 
  arg11 = static_cast< double >(val11);
  ecode12 = SWIG_AsVal_double(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "do_harminv" "', argument " "12"" of type '" "double""'");
  } 
  arg12 = static_cast< double >(val12);
  ecode13 = SWIG_AsVal_double(obj12, &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "do_harminv" "', argument " "13"" of type '" "double""'");
  } 
  arg13 = static_cast< double >(val13);
  ecode14 = SWIG_AsVal_double(obj13, &val14);
  if (!SWIG_IsOK(ecode14)) {
    SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "do_harminv" "', argument " "14"" of type '" "double""'");
  } 
  arg14 = static_cast< double >(val14);
  ecode15 = SWIG_AsVal_double(obj14, &val15);
  if (!SWIG_IsOK(ecode15)) {
    SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "do_harminv" "', argument " "15"" of type '" "double""'");
  } 
  arg15 = static_cast< double >(val15);
  ecode16 = SWIG_AsVal_double(obj15, &val16);
  if (!SWIG_IsOK(ecode16)) {
    SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "do_harminv" "', argument " "16"" of type '" "double""'");
  } 
  arg16 = static_cast< double >(val16);
  {
    try {
      result = (int)meep::do_harminv(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_do_harminv__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< double > *arg1 = (std::complex< double > *) 0 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  std::complex< double > *arg7 = (std::complex< double > *) 0 ;
  double *arg8 = (double *) 0 ;
  double *arg9 = (double *) 0 ;
  double *arg10 = (double *) 0 ;
  double arg11 ;
  double arg12 ;
  double arg13 ;
  double arg14 ;
  double arg15 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  double val11 ;
  int ecode11 = 0 ;
  double val12 ;
  int ecode12 = 0 ;
  double val13 ;
  int ecode13 = 0 ;
  double val14 ;
  int ecode14 = 0 ;
  double val15 ;
  int ecode15 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  PyObject * obj14 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "do_harminv", 15, 15, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13, &obj14)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "do_harminv" "', argument " "1"" of type '" "std::complex< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::complex< double > * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "do_harminv" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "do_harminv" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "do_harminv" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "do_harminv" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "do_harminv" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "do_harminv" "', argument " "7"" of type '" "std::complex< double > *""'"); 
  }
  arg7 = reinterpret_cast< std::complex< double > * >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "do_harminv" "', argument " "8"" of type '" "double *""'"); 
  }
  arg8 = reinterpret_cast< double * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "do_harminv" "', argument " "9"" of type '" "double *""'"); 
  }
  arg9 = reinterpret_cast< double * >(argp9);
  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "do_harminv" "', argument " "10"" of type '" "double *""'"); 
  }
  arg10 = reinterpret_cast< double * >(argp10);
  ecode11 = SWIG_AsVal_double(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "do_harminv" "', argument " "11"" of type '" "double""'");
  } 
  arg11 = static_cast< double >(val11);
  ecode12 = SWIG_AsVal_double(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "do_harminv" "', argument " "12"" of type '" "double""'");
  } 
  arg12 = static_cast< double >(val12);
  ecode13 = SWIG_AsVal_double(obj12, &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "do_harminv" "', argument " "13"" of type '" "double""'");
  } 
  arg13 = static_cast< double >(val13);
  ecode14 = SWIG_AsVal_double(obj13, &val14);
  if (!SWIG_IsOK(ecode14)) {
    SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "do_harminv" "', argument " "14"" of type '" "double""'");
  } 
  arg14 = static_cast< double >(val14);
  ecode15 = SWIG_AsVal_double(obj14, &val15);
  if (!SWIG_IsOK(ecode15)) {
    SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "do_harminv" "', argument " "15"" of type '" "double""'");
  } 
  arg15 = static_cast< double >(val15);
  {
    try {
      result = (int)meep::do_harminv(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_do_harminv__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< double > *arg1 = (std::complex< double > *) 0 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  std::complex< double > *arg7 = (std::complex< double > *) 0 ;
  double *arg8 = (double *) 0 ;
  double *arg9 = (double *) 0 ;
  double *arg10 = (double *) 0 ;
  double arg11 ;
  double arg12 ;
  double arg13 ;
  double arg14 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  double val11 ;
  int ecode11 = 0 ;
  double val12 ;
  int ecode12 = 0 ;
  double val13 ;
  int ecode13 = 0 ;
  double val14 ;
  int ecode14 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "do_harminv", 14, 14, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "do_harminv" "', argument " "1"" of type '" "std::complex< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::complex< double > * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "do_harminv" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "do_harminv" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "do_harminv" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "do_harminv" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "do_harminv" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "do_harminv" "', argument " "7"" of type '" "std::complex< double > *""'"); 
  }
  arg7 = reinterpret_cast< std::complex< double > * >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "do_harminv" "', argument " "8"" of type '" "double *""'"); 
  }
  arg8 = reinterpret_cast< double * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "do_harminv" "', argument " "9"" of type '" "double *""'"); 
  }
  arg9 = reinterpret_cast< double * >(argp9);
  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "do_harminv" "', argument " "10"" of type '" "double *""'"); 
  }
  arg10 = reinterpret_cast< double * >(argp10);
  ecode11 = SWIG_AsVal_double(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "do_harminv" "', argument " "11"" of type '" "double""'");
  } 
  arg11 = static_cast< double >(val11);
  ecode12 = SWIG_AsVal_double(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "do_harminv" "', argument " "12"" of type '" "double""'");
  } 
  arg12 = static_cast< double >(val12);
  ecode13 = SWIG_AsVal_double(obj12, &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "do_harminv" "', argument " "13"" of type '" "double""'");
  } 
  arg13 = static_cast< double >(val13);
  ecode14 = SWIG_AsVal_double(obj13, &val14);
  if (!SWIG_IsOK(ecode14)) {
    SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "do_harminv" "', argument " "14"" of type '" "double""'");
  } 
  arg14 = static_cast< double >(val14);
  {
    try {
      result = (int)meep::do_harminv(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_do_harminv__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< double > *arg1 = (std::complex< double > *) 0 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  std::complex< double > *arg7 = (std::complex< double > *) 0 ;
  double *arg8 = (double *) 0 ;
  double *arg9 = (double *) 0 ;
  double *arg10 = (double *) 0 ;
  double arg11 ;
  double arg12 ;
  double arg13 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  double val11 ;
  int ecode11 = 0 ;
  double val12 ;
  int ecode12 = 0 ;
  double val13 ;
  int ecode13 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "do_harminv", 13, 13, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "do_harminv" "', argument " "1"" of type '" "std::complex< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::complex< double > * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "do_harminv" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "do_harminv" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "do_harminv" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "do_harminv" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "do_harminv" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "do_harminv" "', argument " "7"" of type '" "std::complex< double > *""'"); 
  }
  arg7 = reinterpret_cast< std::complex< double > * >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "do_harminv" "', argument " "8"" of type '" "double *""'"); 
  }
  arg8 = reinterpret_cast< double * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "do_harminv" "', argument " "9"" of type '" "double *""'"); 
  }
  arg9 = reinterpret_cast< double * >(argp9);
  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "do_harminv" "', argument " "10"" of type '" "double *""'"); 
  }
  arg10 = reinterpret_cast< double * >(argp10);
  ecode11 = SWIG_AsVal_double(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "do_harminv" "', argument " "11"" of type '" "double""'");
  } 
  arg11 = static_cast< double >(val11);
  ecode12 = SWIG_AsVal_double(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "do_harminv" "', argument " "12"" of type '" "double""'");
  } 
  arg12 = static_cast< double >(val12);
  ecode13 = SWIG_AsVal_double(obj12, &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "do_harminv" "', argument " "13"" of type '" "double""'");
  } 
  arg13 = static_cast< double >(val13);
  {
    try {
      result = (int)meep::do_harminv(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_do_harminv__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< double > *arg1 = (std::complex< double > *) 0 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  std::complex< double > *arg7 = (std::complex< double > *) 0 ;
  double *arg8 = (double *) 0 ;
  double *arg9 = (double *) 0 ;
  double *arg10 = (double *) 0 ;
  double arg11 ;
  double arg12 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  double val11 ;
  int ecode11 = 0 ;
  double val12 ;
  int ecode12 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "do_harminv", 12, 12, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "do_harminv" "', argument " "1"" of type '" "std::complex< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::complex< double > * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "do_harminv" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "do_harminv" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "do_harminv" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "do_harminv" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "do_harminv" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "do_harminv" "', argument " "7"" of type '" "std::complex< double > *""'"); 
  }
  arg7 = reinterpret_cast< std::complex< double > * >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "do_harminv" "', argument " "8"" of type '" "double *""'"); 
  }
  arg8 = reinterpret_cast< double * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "do_harminv" "', argument " "9"" of type '" "double *""'"); 
  }
  arg9 = reinterpret_cast< double * >(argp9);
  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "do_harminv" "', argument " "10"" of type '" "double *""'"); 
  }
  arg10 = reinterpret_cast< double * >(argp10);
  ecode11 = SWIG_AsVal_double(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "do_harminv" "', argument " "11"" of type '" "double""'");
  } 
  arg11 = static_cast< double >(val11);
  ecode12 = SWIG_AsVal_double(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "do_harminv" "', argument " "12"" of type '" "double""'");
  } 
  arg12 = static_cast< double >(val12);
  {
    try {
      result = (int)meep::do_harminv(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_do_harminv__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< double > *arg1 = (std::complex< double > *) 0 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  std::complex< double > *arg7 = (std::complex< double > *) 0 ;
  double *arg8 = (double *) 0 ;
  double *arg9 = (double *) 0 ;
  double *arg10 = (double *) 0 ;
  double arg11 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  double val11 ;
  int ecode11 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "do_harminv", 11, 11, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "do_harminv" "', argument " "1"" of type '" "std::complex< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::complex< double > * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "do_harminv" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "do_harminv" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "do_harminv" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "do_harminv" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "do_harminv" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "do_harminv" "', argument " "7"" of type '" "std::complex< double > *""'"); 
  }
  arg7 = reinterpret_cast< std::complex< double > * >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "do_harminv" "', argument " "8"" of type '" "double *""'"); 
  }
  arg8 = reinterpret_cast< double * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "do_harminv" "', argument " "9"" of type '" "double *""'"); 
  }
  arg9 = reinterpret_cast< double * >(argp9);
  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "do_harminv" "', argument " "10"" of type '" "double *""'"); 
  }
  arg10 = reinterpret_cast< double * >(argp10);
  ecode11 = SWIG_AsVal_double(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "do_harminv" "', argument " "11"" of type '" "double""'");
  } 
  arg11 = static_cast< double >(val11);
  {
    try {
      result = (int)meep::do_harminv(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_do_harminv__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< double > *arg1 = (std::complex< double > *) 0 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  std::complex< double > *arg7 = (std::complex< double > *) 0 ;
  double *arg8 = (double *) 0 ;
  double *arg9 = (double *) 0 ;
  double *arg10 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "do_harminv", 10, 10, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "do_harminv" "', argument " "1"" of type '" "std::complex< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::complex< double > * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "do_harminv" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "do_harminv" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "do_harminv" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "do_harminv" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "do_harminv" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "do_harminv" "', argument " "7"" of type '" "std::complex< double > *""'"); 
  }
  arg7 = reinterpret_cast< std::complex< double > * >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "do_harminv" "', argument " "8"" of type '" "double *""'"); 
  }
  arg8 = reinterpret_cast< double * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "do_harminv" "', argument " "9"" of type '" "double *""'"); 
  }
  arg9 = reinterpret_cast< double * >(argp9);
  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "do_harminv" "', argument " "10"" of type '" "double *""'"); 
  }
  arg10 = reinterpret_cast< double * >(argp10);
  {
    try {
      result = (int)meep::do_harminv(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_do_harminv__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< double > *arg1 = (std::complex< double > *) 0 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  std::complex< double > *arg7 = (std::complex< double > *) 0 ;
  double *arg8 = (double *) 0 ;
  double *arg9 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "do_harminv", 9, 9, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "do_harminv" "', argument " "1"" of type '" "std::complex< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::complex< double > * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "do_harminv" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "do_harminv" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "do_harminv" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "do_harminv" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "do_harminv" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "do_harminv" "', argument " "7"" of type '" "std::complex< double > *""'"); 
  }
  arg7 = reinterpret_cast< std::complex< double > * >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "do_harminv" "', argument " "8"" of type '" "double *""'"); 
  }
  arg8 = reinterpret_cast< double * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "do_harminv" "', argument " "9"" of type '" "double *""'"); 
  }
  arg9 = reinterpret_cast< double * >(argp9);
  {
    try {
      result = (int)meep::do_harminv(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_do_harminv(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[17] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 16) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 9) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__complexT_double_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_std__complexT_double_t, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_double, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_double, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      return _wrap_do_harminv__SWIG_7(self, args);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 10) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__complexT_double_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_std__complexT_double_t, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_double, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_double, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      void *vptr = 0;
                      int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_double, 0);
                      _v = SWIG_CheckState(res);
                      if (_v) {
                        return _wrap_do_harminv__SWIG_6(self, args);
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 11) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__complexT_double_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_std__complexT_double_t, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_double, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_double, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      void *vptr = 0;
                      int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_double, 0);
                      _v = SWIG_CheckState(res);
                      if (_v) {
                        {
                          int res = SWIG_AsVal_double(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          return _wrap_do_harminv__SWIG_5(self, args);
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 12) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__complexT_double_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_std__complexT_double_t, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_double, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_double, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      void *vptr = 0;
                      int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_double, 0);
                      _v = SWIG_CheckState(res);
                      if (_v) {
                        {
                          int res = SWIG_AsVal_double(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          {
                            int res = SWIG_AsVal_double(argv[11], NULL);
                            _v = SWIG_CheckState(res);
                          }
                          if (_v) {
                            return _wrap_do_harminv__SWIG_4(self, args);
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 13) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__complexT_double_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_std__complexT_double_t, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_double, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_double, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      void *vptr = 0;
                      int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_double, 0);
                      _v = SWIG_CheckState(res);
                      if (_v) {
                        {
                          int res = SWIG_AsVal_double(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          {
                            int res = SWIG_AsVal_double(argv[11], NULL);
                            _v = SWIG_CheckState(res);
                          }
                          if (_v) {
                            {
                              int res = SWIG_AsVal_double(argv[12], NULL);
                              _v = SWIG_CheckState(res);
                            }
                            if (_v) {
                              return _wrap_do_harminv__SWIG_3(self, args);
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 14) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__complexT_double_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_std__complexT_double_t, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_double, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_double, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      void *vptr = 0;
                      int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_double, 0);
                      _v = SWIG_CheckState(res);
                      if (_v) {
                        {
                          int res = SWIG_AsVal_double(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          {
                            int res = SWIG_AsVal_double(argv[11], NULL);
                            _v = SWIG_CheckState(res);
                          }
                          if (_v) {
                            {
                              int res = SWIG_AsVal_double(argv[12], NULL);
                              _v = SWIG_CheckState(res);
                            }
                            if (_v) {
                              {
                                int res = SWIG_AsVal_double(argv[13], NULL);
                                _v = SWIG_CheckState(res);
                              }
                              if (_v) {
                                return _wrap_do_harminv__SWIG_2(self, args);
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 15) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__complexT_double_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_std__complexT_double_t, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_double, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_double, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      void *vptr = 0;
                      int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_double, 0);
                      _v = SWIG_CheckState(res);
                      if (_v) {
                        {
                          int res = SWIG_AsVal_double(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          {
                            int res = SWIG_AsVal_double(argv[11], NULL);
                            _v = SWIG_CheckState(res);
                          }
                          if (_v) {
                            {
                              int res = SWIG_AsVal_double(argv[12], NULL);
                              _v = SWIG_CheckState(res);
                            }
                            if (_v) {
                              {
                                int res = SWIG_AsVal_double(argv[13], NULL);
                                _v = SWIG_CheckState(res);
                              }
                              if (_v) {
                                {
                                  int res = SWIG_AsVal_double(argv[14], NULL);
                                  _v = SWIG_CheckState(res);
                                }
                                if (_v) {
                                  return _wrap_do_harminv__SWIG_1(self, args);
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 16) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__complexT_double_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_std__complexT_double_t, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_double, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_double, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      void *vptr = 0;
                      int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_double, 0);
                      _v = SWIG_CheckState(res);
                      if (_v) {
                        {
                          int res = SWIG_AsVal_double(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          {
                            int res = SWIG_AsVal_double(argv[11], NULL);
                            _v = SWIG_CheckState(res);
                          }
                          if (_v) {
                            {
                              int res = SWIG_AsVal_double(argv[12], NULL);
                              _v = SWIG_CheckState(res);
                            }
                            if (_v) {
                              {
                                int res = SWIG_AsVal_double(argv[13], NULL);
                                _v = SWIG_CheckState(res);
                              }
                              if (_v) {
                                {
                                  int res = SWIG_AsVal_double(argv[14], NULL);
                                  _v = SWIG_CheckState(res);
                                }
                                if (_v) {
                                  {
                                    int res = SWIG_AsVal_double(argv[15], NULL);
                                    _v = SWIG_CheckState(res);
                                  }
                                  if (_v) {
                                    return _wrap_do_harminv__SWIG_0(self, args);
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'do_harminv'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::do_harminv(std::complex< double > *,int,double,double,double,int,std::complex< double > *,double *,double *,double *,double,double,double,double,double,double)\n"
    "    meep::do_harminv(std::complex< double > *,int,double,double,double,int,std::complex< double > *,double *,double *,double *,double,double,double,double,double)\n"
    "    meep::do_harminv(std::complex< double > *,int,double,double,double,int,std::complex< double > *,double *,double *,double *,double,double,double,double)\n"
    "    meep::do_harminv(std::complex< double > *,int,double,double,double,int,std::complex< double > *,double *,double *,double *,double,double,double)\n"
    "    meep::do_harminv(std::complex< double > *,int,double,double,double,int,std::complex< double > *,double *,double *,double *,double,double)\n"
    "    meep::do_harminv(std::complex< double > *,int,double,double,double,int,std::complex< double > *,double *,double *,double *,double)\n"
    "    meep::do_harminv(std::complex< double > *,int,double,double,double,int,std::complex< double > *,double *,double *,double *)\n"
    "    meep::do_harminv(std::complex< double > *,int,double,double,double,int,std::complex< double > *,double *,double *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_make_casimir_gfunc__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  meep::field_type arg4 ;
  std::complex< double > (*arg5)(std::complex< double >) = (std::complex< double > (*)(std::complex< double >)) 0 ;
  double arg6 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  std::complex< double > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "make_casimir_gfunc", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "make_casimir_gfunc" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "make_casimir_gfunc" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "make_casimir_gfunc" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "make_casimir_gfunc" "', argument " "4"" of type '" "meep::field_type""'");
  } 
  arg4 = static_cast< meep::field_type >(val4);
  {
    int res = SWIG_ConvertFunctionPtr(obj4, (void**)(&arg5), SWIGTYPE_p_f_std__complex__double____std__complexT_double_t);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "make_casimir_gfunc" "', argument " "5"" of type '" "std::complex< double > (*)(std::complex< double >)""'"); 
    }
  }
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "make_casimir_gfunc" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  {
    try {
      result = (std::complex< double > *)meep::make_casimir_gfunc(arg1,arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_make_casimir_gfunc__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  meep::field_type arg4 ;
  std::complex< double > (*arg5)(std::complex< double >) = (std::complex< double > (*)(std::complex< double >)) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  std::complex< double > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "make_casimir_gfunc", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "make_casimir_gfunc" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "make_casimir_gfunc" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "make_casimir_gfunc" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "make_casimir_gfunc" "', argument " "4"" of type '" "meep::field_type""'");
  } 
  arg4 = static_cast< meep::field_type >(val4);
  {
    int res = SWIG_ConvertFunctionPtr(obj4, (void**)(&arg5), SWIGTYPE_p_f_std__complex__double____std__complexT_double_t);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "make_casimir_gfunc" "', argument " "5"" of type '" "std::complex< double > (*)(std::complex< double >)""'"); 
    }
  }
  {
    try {
      result = (std::complex< double > *)meep::make_casimir_gfunc(arg1,arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_make_casimir_gfunc__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  meep::field_type arg4 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  std::complex< double > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "make_casimir_gfunc", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "make_casimir_gfunc" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "make_casimir_gfunc" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "make_casimir_gfunc" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "make_casimir_gfunc" "', argument " "4"" of type '" "meep::field_type""'");
  } 
  arg4 = static_cast< meep::field_type >(val4);
  {
    try {
      result = (std::complex< double > *)meep::make_casimir_gfunc(arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_make_casimir_gfunc(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[7] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 4) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_make_casimir_gfunc__SWIG_2(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertFunctionPtr(argv[4], &ptr, SWIGTYPE_p_f_std__complex__double____std__complexT_double_t);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_make_casimir_gfunc__SWIG_1(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            void *ptr = 0;
            int res = SWIG_ConvertFunctionPtr(argv[4], &ptr, SWIGTYPE_p_f_std__complex__double____std__complexT_double_t);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_make_casimir_gfunc__SWIG_0(self, args);
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'make_casimir_gfunc'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::make_casimir_gfunc(double,double,double,meep::field_type,std::complex< double > (*)(std::complex< double >),double)\n"
    "    meep::make_casimir_gfunc(double,double,double,meep::field_type,std::complex< double > (*)(std::complex< double >))\n"
    "    meep::make_casimir_gfunc(double,double,double,meep::field_type)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_make_casimir_gfunc_kz(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  meep::field_type arg4 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  std::complex< double > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "make_casimir_gfunc_kz", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "make_casimir_gfunc_kz" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "make_casimir_gfunc_kz" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "make_casimir_gfunc_kz" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "make_casimir_gfunc_kz" "', argument " "4"" of type '" "meep::field_type""'");
  } 
  arg4 = static_cast< meep::field_type >(val4);
  {
    try {
      result = (std::complex< double > *)meep::make_casimir_gfunc_kz(arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_set_random_seed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  unsigned long arg1 ;
  unsigned long val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "set_random_seed", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_long(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "set_random_seed" "', argument " "1"" of type '" "unsigned long""'");
  } 
  arg1 = static_cast< unsigned long >(val1);
  {
    try {
      meep::set_random_seed(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_restore_random_seed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  
  if (!PyArg_UnpackTuple(args, "restore_random_seed", 0, 0)) SWIG_fail;
  {
    try {
      meep::restore_random_seed();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_uniform_random(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "uniform_random", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "uniform_random" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "uniform_random" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = (double)meep::uniform_random(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_gaussian_random(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "gaussian_random", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "gaussian_random" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gaussian_random" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = (double)meep::gaussian_random(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_random_int(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "random_int", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "random_int" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "random_int" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      result = (int)meep::random_int(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_BesselJ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  double arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "BesselJ", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "BesselJ" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BesselJ" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = (double)meep::BesselJ(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_green2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< double > *arg1 = (std::complex< double > *) 0 ;
  meep::vec *arg2 = 0 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  meep::vec *arg6 = 0 ;
  meep::component arg7 ;
  std::complex< double > arg8 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  std::complex< double > val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "green2d", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "green2d" "', argument " "1"" of type '" "std::complex< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::complex< double > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "green2d" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "green2d" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "green2d" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "green2d" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "green2d" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "green2d" "', argument " "6"" of type '" "meep::vec const &""'"); 
  }
  if (!argp6) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "green2d" "', argument " "6"" of type '" "meep::vec const &""'"); 
  }
  arg6 = reinterpret_cast< meep::vec * >(argp6);
  {
    arg7 = static_cast<meep::component>(PyInteger_AsLong(obj6));
  }
  ecode8 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "green2d" "', argument " "8"" of type '" "std::complex< double >""'");
  } 
  arg8 = static_cast< std::complex< double > >(val8);
  {
    try {
      meep::green2d(arg1,(meep::vec const &)*arg2,arg3,arg4,arg5,(meep::vec const &)*arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_green3d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< double > *arg1 = (std::complex< double > *) 0 ;
  meep::vec *arg2 = 0 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  meep::vec *arg6 = 0 ;
  meep::component arg7 ;
  std::complex< double > arg8 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  std::complex< double > val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "green3d", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "green3d" "', argument " "1"" of type '" "std::complex< double > *""'"); 
  }
  arg1 = reinterpret_cast< std::complex< double > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "green3d" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "green3d" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "green3d" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "green3d" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "green3d" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "green3d" "', argument " "6"" of type '" "meep::vec const &""'"); 
  }
  if (!argp6) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "green3d" "', argument " "6"" of type '" "meep::vec const &""'"); 
  }
  arg6 = reinterpret_cast< meep::vec * >(argp6);
  {
    arg7 = static_cast<meep::component>(PyInteger_AsLong(obj6));
  }
  ecode8 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "green3d" "', argument " "8"" of type '" "std::complex< double >""'");
  } 
  arg8 = static_cast< std::complex< double > >(val8);
  {
    try {
      meep::green3d(arg1,(meep::vec const &)*arg2,arg3,arg4,arg5,(meep::vec const &)*arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_destroy_eigenmode_data__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  void *arg1 = (void *) 0 ;
  bool arg2 ;
  int res1 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "destroy_eigenmode_data", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "destroy_eigenmode_data" "', argument " "1"" of type '" "void *""'"); 
  }
  ecode2 = SWIG_AsVal_bool(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "destroy_eigenmode_data" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  {
    try {
      meep::destroy_eigenmode_data(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_destroy_eigenmode_data__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  void *arg1 = (void *) 0 ;
  int res1 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "destroy_eigenmode_data", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "destroy_eigenmode_data" "', argument " "1"" of type '" "void *""'"); 
  }
  {
    try {
      meep::destroy_eigenmode_data(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_destroy_eigenmode_data(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    void *ptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &ptr, 0, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_destroy_eigenmode_data__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    void *ptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &ptr, 0, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_bool(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_destroy_eigenmode_data__SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'destroy_eigenmode_data'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::destroy_eigenmode_data(void *,bool)\n"
    "    meep::destroy_eigenmode_data(void *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_eigenmode_amplitude(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  void *arg1 = (void *) 0 ;
  meep::vec *arg2 = 0 ;
  meep::component arg3 ;
  int res1 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "eigenmode_amplitude", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eigenmode_amplitude" "', argument " "1"" of type '" "void *""'"); 
  }
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "eigenmode_amplitude" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "eigenmode_amplitude" "', argument " "2"" of type '" "meep::vec const &""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  {
    arg3 = static_cast<meep::component>(PyInteger_AsLong(obj2));
  }
  {
    try {
      result = meep::eigenmode_amplitude(arg1,(meep::vec const &)*arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_group_velocity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  void *arg1 = (void *) 0 ;
  int res1 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "get_group_velocity", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_group_velocity" "', argument " "1"" of type '" "void *""'"); 
  }
  {
    try {
      result = (double)meep::get_group_velocity(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_k(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  void *arg1 = (void *) 0 ;
  int res1 ;
  PyObject * obj0 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "get_k", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_k" "', argument " "1"" of type '" "void *""'"); 
  }
  {
    try {
      result = meep::get_k(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_linear_interpolate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  int arg5 ;
  int arg6 ;
  int arg7 ;
  int arg8 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  int val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "linear_interpolate", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "linear_interpolate" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "linear_interpolate" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "linear_interpolate" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "linear_interpolate" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = reinterpret_cast< double * >(argp4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "linear_interpolate" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "linear_interpolate" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_int(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "linear_interpolate" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  ecode8 = SWIG_AsVal_int(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "linear_interpolate" "', argument " "8"" of type '" "int""'");
  } 
  arg8 = static_cast< int >(val8);
  {
    try {
      result = (double)meep::linear_interpolate(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_split_plane_dir_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::split_plane *arg1 = (meep::split_plane *) 0 ;
  meep::direction arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "split_plane_dir_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__split_plane, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "split_plane_dir_set" "', argument " "1"" of type '" "meep::split_plane *""'"); 
  }
  arg1 = reinterpret_cast< meep::split_plane * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "split_plane_dir_set" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  if (arg1) (arg1)->dir = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_split_plane_dir_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::split_plane *arg1 = (meep::split_plane *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::direction result;
  
  if (!PyArg_UnpackTuple(args, "split_plane_dir_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__split_plane, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "split_plane_dir_get" "', argument " "1"" of type '" "meep::split_plane *""'"); 
  }
  arg1 = reinterpret_cast< meep::split_plane * >(argp1);
  result = (meep::direction) ((arg1)->dir);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_split_plane_pos_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::split_plane *arg1 = (meep::split_plane *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "split_plane_pos_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__split_plane, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "split_plane_pos_set" "', argument " "1"" of type '" "meep::split_plane *""'"); 
  }
  arg1 = reinterpret_cast< meep::split_plane * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "split_plane_pos_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->pos = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_split_plane_pos_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::split_plane *arg1 = (meep::split_plane *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "split_plane_pos_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__split_plane, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "split_plane_pos_get" "', argument " "1"" of type '" "meep::split_plane *""'"); 
  }
  arg1 = reinterpret_cast< meep::split_plane * >(argp1);
  result = (double) ((arg1)->pos);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_split_plane(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::split_plane *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_split_plane", 0, 0)) SWIG_fail;
  {
    try {
      result = (meep::split_plane *)new meep::split_plane();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__split_plane, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_split_plane(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::split_plane *arg1 = (meep::split_plane *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_split_plane", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__split_plane, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_split_plane" "', argument " "1"" of type '" "meep::split_plane *""'"); 
  }
  arg1 = reinterpret_cast< meep::split_plane * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *split_plane_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__split_plane, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *split_plane_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_binary_partition__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::binary_partition *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_binary_partition", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_binary_partition" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    try {
      result = (meep::binary_partition *)new meep::binary_partition(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__binary_partition, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_binary_partition__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::split_plane *arg1 = 0 ;
  std::unique_ptr< meep::binary_partition > *arg2 = 0 ;
  std::unique_ptr< meep::binary_partition > *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::binary_partition *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_binary_partition", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__split_plane,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_binary_partition" "', argument " "1"" of type '" "meep::split_plane const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_binary_partition" "', argument " "1"" of type '" "meep::split_plane const &""'"); 
  }
  arg1 = reinterpret_cast< meep::split_plane * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__unique_ptrT_meep__binary_partition_t,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_binary_partition" "', argument " "2"" of type '" "std::unique_ptr< meep::binary_partition > &&""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_binary_partition" "', argument " "2"" of type '" "std::unique_ptr< meep::binary_partition > &&""'"); 
  }
  arg2 = reinterpret_cast< std::unique_ptr< meep::binary_partition > * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__unique_ptrT_meep__binary_partition_t,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_binary_partition" "', argument " "3"" of type '" "std::unique_ptr< meep::binary_partition > &&""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_binary_partition" "', argument " "3"" of type '" "std::unique_ptr< meep::binary_partition > &&""'"); 
  }
  arg3 = reinterpret_cast< std::unique_ptr< meep::binary_partition > * >(argp3);
  {
    try {
      result = (meep::binary_partition *)new meep::binary_partition((meep::split_plane const &)*arg1,(std::unique_ptr< meep::binary_partition > &&)*arg2,(std::unique_ptr< meep::binary_partition > &&)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__binary_partition, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_binary_partition__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::binary_partition *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::binary_partition *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_binary_partition", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__binary_partition,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_binary_partition" "', argument " "1"" of type '" "meep::binary_partition const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_binary_partition" "', argument " "1"" of type '" "meep::binary_partition const &""'"); 
  }
  arg1 = reinterpret_cast< meep::binary_partition * >(argp1);
  {
    try {
      result = (meep::binary_partition *)new meep::binary_partition((meep::binary_partition const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__binary_partition, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_binary_partition(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__binary_partition, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_binary_partition__SWIG_2(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_binary_partition__SWIG_0(self, args);
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__split_plane, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__unique_ptrT_meep__binary_partition_t, SWIG_POINTER_NO_NULL);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_std__unique_ptrT_meep__binary_partition_t, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_new_binary_partition__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_binary_partition'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::binary_partition::binary_partition(int)\n"
    "    meep::binary_partition::binary_partition(meep::split_plane const &,std::unique_ptr< meep::binary_partition > &&,std::unique_ptr< meep::binary_partition > &&)\n"
    "    meep::binary_partition::binary_partition(meep::binary_partition const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_binary_partition_is_leaf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::binary_partition *arg1 = (meep::binary_partition *) 0 ;
  std::unique_ptr< meep::binary_partition > temp1 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "binary_partition_is_leaf", 1, 1, &obj0)) SWIG_fail;
  {
    temp1 = py_bp_to_bp(obj0);
    arg1 = temp1.get();
  }
  {
    try {
      result = (bool)((meep::binary_partition const *)arg1)->is_leaf();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_binary_partition_get_proc_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::binary_partition *arg1 = (meep::binary_partition *) 0 ;
  std::unique_ptr< meep::binary_partition > temp1 ;
  PyObject * obj0 = 0 ;
  int result;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "binary_partition_get_proc_id", 1, 1, &obj0)) SWIG_fail;
  {
    temp1 = py_bp_to_bp(obj0);
    arg1 = temp1.get();
  }
  {
    try {
      result = (int)((meep::binary_partition const *)arg1)->get_proc_id();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_binary_partition_get_plane(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::binary_partition *arg1 = (meep::binary_partition *) 0 ;
  std::unique_ptr< meep::binary_partition > temp1 ;
  PyObject * obj0 = 0 ;
  meep::split_plane *result = 0 ;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "binary_partition_get_plane", 1, 1, &obj0)) SWIG_fail;
  {
    temp1 = py_bp_to_bp(obj0);
    arg1 = temp1.get();
  }
  {
    try {
      result = (meep::split_plane *) &((meep::binary_partition const *)arg1)->get_plane();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__split_plane, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_binary_partition_left_tree(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::binary_partition *arg1 = (meep::binary_partition *) 0 ;
  std::unique_ptr< meep::binary_partition > temp1 ;
  PyObject * obj0 = 0 ;
  meep::binary_partition *result = 0 ;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "binary_partition_left_tree", 1, 1, &obj0)) SWIG_fail;
  {
    temp1 = py_bp_to_bp(obj0);
    arg1 = temp1.get();
  }
  {
    try {
      result = (meep::binary_partition *)((meep::binary_partition const *)arg1)->left_tree();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    resultobj = bp_to_py_bp(result);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_binary_partition_right_tree(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::binary_partition *arg1 = (meep::binary_partition *) 0 ;
  std::unique_ptr< meep::binary_partition > temp1 ;
  PyObject * obj0 = 0 ;
  meep::binary_partition *result = 0 ;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "binary_partition_right_tree", 1, 1, &obj0)) SWIG_fail;
  {
    temp1 = py_bp_to_bp(obj0);
    arg1 = temp1.get();
  }
  {
    try {
      result = (meep::binary_partition *)((meep::binary_partition const *)arg1)->right_tree();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    resultobj = bp_to_py_bp(result);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_binary_partition(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::binary_partition *arg1 = (meep::binary_partition *) 0 ;
  std::unique_ptr< meep::binary_partition > temp1 ;
  PyObject * obj0 = 0 ;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "delete_binary_partition", 1, 1, &obj0)) SWIG_fail;
  {
    temp1 = py_bp_to_bp(obj0);
    arg1 = temp1.get();
  }
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *binary_partition_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__binary_partition, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *binary_partition_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_set_zero_subnormals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  bool arg1 ;
  bool val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "set_zero_subnormals", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_bool(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "set_zero_subnormals" "', argument " "1"" of type '" "bool""'");
  } 
  arg1 = static_cast< bool >(val1);
  {
    try {
      meep::set_zero_subnormals(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_setup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  
  if (!PyArg_UnpackTuple(args, "setup", 0, 0)) SWIG_fail;
  {
    try {
      meep::setup();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_split_into_tiles(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume arg1 ;
  std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > *arg2 = (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > *) 0 ;
  size_t arg3 ;
  void *argp1 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  size_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "split_into_tiles", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  {
    res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__grid_volume,  0  | 0);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "split_into_tiles" "', argument " "1"" of type '" "meep::grid_volume""'"); 
    }  
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "split_into_tiles" "', argument " "1"" of type '" "meep::grid_volume""'");
    } else {
      meep::grid_volume * temp = reinterpret_cast< meep::grid_volume * >(argp1);
      arg1 = *temp;
      if (SWIG_IsNewObj(res1)) delete temp;
    }
  }
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "split_into_tiles" "', argument " "2"" of type '" "std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > *""'"); 
  }
  arg2 = reinterpret_cast< std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > * >(argp2);
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "split_into_tiles" "', argument " "3"" of type '" "size_t""'");
  } 
  arg3 = static_cast< size_t >(val3);
  {
    try {
      meep::split_into_tiles(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_check_tiles(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::grid_volume arg1 ;
  std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > *arg2 = 0 ;
  void *argp1 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "check_tiles", 2, 2, &obj0, &obj1)) SWIG_fail;
  {
    res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__grid_volume,  0  | 0);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "check_tiles" "', argument " "1"" of type '" "meep::grid_volume""'"); 
    }  
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "check_tiles" "', argument " "1"" of type '" "meep::grid_volume""'");
    } else {
      meep::grid_volume * temp = reinterpret_cast< meep::grid_volume * >(argp1);
      arg1 = *temp;
      if (SWIG_IsNewObj(res1)) delete temp;
    }
  }
  {
    std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > *ptr = (std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > *)0;
    res2 = swig::asptr(obj1, &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "check_tiles" "', argument " "2"" of type '" "std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "check_tiles" "', argument " "2"" of type '" "std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      meep::check_tiles(arg1,(std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_wall_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double result;
  
  if (!PyArg_UnpackTuple(args, "wall_time", 0, 0)) SWIG_fail;
  {
    try {
      result = (double)meep::wall_time();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_initialize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int *arg1 = 0 ;
  char ***arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::initialize *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_initialize", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_int,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_initialize" "', argument " "1"" of type '" "int &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_initialize" "', argument " "1"" of type '" "int &""'"); 
  }
  arg1 = reinterpret_cast< int * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_p_p_char,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_initialize" "', argument " "2"" of type '" "char **&""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_initialize" "', argument " "2"" of type '" "char **&""'"); 
  }
  arg2 = reinterpret_cast< char *** >(argp2);
  {
    try {
      result = (meep::initialize *)new meep::initialize(*arg1,*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__initialize, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_initialize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::initialize *arg1 = (meep::initialize *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_initialize", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__initialize, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_initialize" "', argument " "1"" of type '" "meep::initialize *""'"); 
  }
  arg1 = reinterpret_cast< meep::initialize * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_initialize_elapsed_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::initialize *arg1 = (meep::initialize *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "initialize_elapsed_time", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__initialize, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "initialize_elapsed_time" "', argument " "1"" of type '" "meep::initialize *""'"); 
  }
  arg1 = reinterpret_cast< meep::initialize * >(argp1);
  {
    try {
      result = (double)(arg1)->elapsed_time();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *initialize_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__initialize, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *initialize_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_all_wait(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  
  if (!PyArg_UnpackTuple(args, "all_wait", 0, 0)) SWIG_fail;
  {
    try {
      meep::all_wait();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_count_processors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int result;
  
  if (!PyArg_UnpackTuple(args, "count_processors", 0, 0)) SWIG_fail;
  {
    try {
      result = (int)meep::count_processors();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_my_rank(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int result;
  
  if (!PyArg_UnpackTuple(args, "my_rank", 0, 0)) SWIG_fail;
  {
    try {
      result = (int)meep::my_rank();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_am_really_master(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "am_really_master", 0, 0)) SWIG_fail;
  {
    try {
      result = (bool)meep::am_really_master();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_am_master(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int result;
  
  if (!PyArg_UnpackTuple(args, "am_master", 0, 0)) SWIG_fail;
  {
    try {
      result = (int)meep::am_master();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_with_mpi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "with_mpi", 0, 0)) SWIG_fail;
  {
    try {
      result = (bool)meep::with_mpi();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_send__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  double *arg3 = (double *) 0 ;
  int arg4 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "send", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "send" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "send" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "send" "', argument " "3"" of type '" "double *""'"); 
  }
  arg3 = reinterpret_cast< double * >(argp3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "send" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    try {
      meep::send(arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_send__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  double *arg3 = (double *) 0 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "send", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "send" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "send" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "send" "', argument " "3"" of type '" "double *""'"); 
  }
  arg3 = reinterpret_cast< double * >(argp3);
  {
    try {
      meep::send(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_send(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_send__SWIG_1(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_send__SWIG_0(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'send'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::send(int,int,double *,int)\n"
    "    meep::send(int,int,double *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_broadcast__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  float *arg2 = (float *) 0 ;
  int arg3 ;
  int val1 ;
  int ecode1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "broadcast", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "broadcast" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "broadcast" "', argument " "2"" of type '" "float *""'"); 
  }
  arg2 = reinterpret_cast< float * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "broadcast" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      meep::broadcast(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_broadcast__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  double *arg2 = (double *) 0 ;
  int arg3 ;
  int val1 ;
  int ecode1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "broadcast", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "broadcast" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "broadcast" "', argument " "2"" of type '" "double *""'"); 
  }
  arg2 = reinterpret_cast< double * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "broadcast" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      meep::broadcast(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_broadcast__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  int val1 ;
  int ecode1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "broadcast", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "broadcast" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "broadcast" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "broadcast" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      meep::broadcast(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_broadcast__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int *arg2 = (int *) 0 ;
  int arg3 ;
  int val1 ;
  int ecode1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "broadcast", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "broadcast" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "broadcast" "', argument " "2"" of type '" "int *""'"); 
  }
  arg2 = reinterpret_cast< int * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "broadcast" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      meep::broadcast(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_broadcast__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  size_t *arg2 = (size_t *) 0 ;
  int arg3 ;
  int val1 ;
  int ecode1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "broadcast", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "broadcast" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "broadcast" "', argument " "2"" of type '" "size_t *""'"); 
  }
  arg2 = reinterpret_cast< size_t * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "broadcast" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      meep::broadcast(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_broadcast__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  std::complex< double > *arg2 = (std::complex< double > *) 0 ;
  int arg3 ;
  int val1 ;
  int ecode1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "broadcast", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "broadcast" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "broadcast" "', argument " "2"" of type '" "std::complex< double > *""'"); 
  }
  arg2 = reinterpret_cast< std::complex< double > * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "broadcast" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      meep::broadcast(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_broadcast__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  std::complex< double > arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  std::complex< double > val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "broadcast", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "broadcast" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "broadcast" "', argument " "2"" of type '" "std::complex< double >""'");
  } 
  arg2 = static_cast< std::complex< double > >(val2);
  {
    try {
      result = meep::broadcast(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_broadcast__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  double arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "broadcast", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "broadcast" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "broadcast" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = (double)meep::broadcast(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_broadcast__SWIG_8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "broadcast", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "broadcast" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "broadcast" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      result = (int)meep::broadcast(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_broadcast__SWIG_9(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  bool arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "broadcast", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "broadcast" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  ecode2 = SWIG_AsVal_bool(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "broadcast" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  {
    try {
      result = (bool)meep::broadcast(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_broadcast(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_bool(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_broadcast__SWIG_9(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_broadcast__SWIG_8(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_broadcast__SWIG_7(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_broadcast__SWIG_6(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_size_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_broadcast__SWIG_4(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__complexT_double_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_broadcast__SWIG_5(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_float, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_broadcast__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_double, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_broadcast__SWIG_1(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_int, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_broadcast__SWIG_3(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_broadcast__SWIG_2(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'broadcast'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::broadcast(int,float *,int)\n"
    "    meep::broadcast(int,double *,int)\n"
    "    meep::broadcast(int,char *,int)\n"
    "    meep::broadcast(int,int *,int)\n"
    "    meep::broadcast(int,size_t *,int)\n"
    "    meep::broadcast(int,std::complex< double > *,int)\n"
    "    meep::broadcast(int,std::complex< double >)\n"
    "    meep::broadcast(int,double)\n"
    "    meep::broadcast(int,int)\n"
    "    meep::broadcast(int,bool)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_max_to_master(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "max_to_master", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "max_to_master" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  {
    try {
      result = (double)meep::max_to_master(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_max_to_all__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "max_to_all", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "max_to_all" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  {
    try {
      result = (double)meep::max_to_all(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_max_to_all__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "max_to_all", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "max_to_all" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    try {
      result = (int)meep::max_to_all(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_max_to_all(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[2] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep__ivec, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_max_to_all__SWIG_0(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_max_to_all__SWIG_2(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_max_to_all__SWIG_1(self, args);
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'max_to_all'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::max_to_all(meep::ivec const &)\n"
    "    meep::max_to_all(double)\n"
    "    meep::max_to_all(int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_min_to_all(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "min_to_all", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "min_to_all" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    try {
      result = (int)meep::min_to_all(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sum_to_master__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  float arg1 ;
  float val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  float result;
  
  if (!PyArg_UnpackTuple(args, "sum_to_master", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_float(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "sum_to_master" "', argument " "1"" of type '" "float""'");
  } 
  arg1 = static_cast< float >(val1);
  {
    try {
      result = (float)meep::sum_to_master(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_float(static_cast< float >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sum_to_master__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "sum_to_master", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "sum_to_master" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  {
    try {
      result = (double)meep::sum_to_master(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sum_to_all__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "sum_to_all", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "sum_to_all" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  {
    try {
      result = (double)meep::sum_to_all(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sum_to_all__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  float *arg1 = (float *) 0 ;
  float *arg2 = (float *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "sum_to_all", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sum_to_all" "', argument " "1"" of type '" "float const *""'"); 
  }
  arg1 = reinterpret_cast< float * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sum_to_all" "', argument " "2"" of type '" "float *""'"); 
  }
  arg2 = reinterpret_cast< float * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sum_to_all" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      meep::sum_to_all((float const *)arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sum_to_all__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  double *arg2 = (double *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "sum_to_all", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sum_to_all" "', argument " "1"" of type '" "double const *""'"); 
  }
  arg1 = reinterpret_cast< double * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sum_to_all" "', argument " "2"" of type '" "double *""'"); 
  }
  arg2 = reinterpret_cast< double * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sum_to_all" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      meep::sum_to_all((double const *)arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sum_to_master__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  float *arg1 = (float *) 0 ;
  float *arg2 = (float *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "sum_to_master", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sum_to_master" "', argument " "1"" of type '" "float const *""'"); 
  }
  arg1 = reinterpret_cast< float * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sum_to_master" "', argument " "2"" of type '" "float *""'"); 
  }
  arg2 = reinterpret_cast< float * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sum_to_master" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      meep::sum_to_master((float const *)arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sum_to_master__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  double *arg2 = (double *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "sum_to_master", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sum_to_master" "', argument " "1"" of type '" "double const *""'"); 
  }
  arg1 = reinterpret_cast< double * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sum_to_master" "', argument " "2"" of type '" "double *""'"); 
  }
  arg2 = reinterpret_cast< double * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sum_to_master" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      meep::sum_to_master((double const *)arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sum_to_all__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  float *arg1 = (float *) 0 ;
  double *arg2 = (double *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "sum_to_all", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sum_to_all" "', argument " "1"" of type '" "float const *""'"); 
  }
  arg1 = reinterpret_cast< float * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sum_to_all" "', argument " "2"" of type '" "double *""'"); 
  }
  arg2 = reinterpret_cast< double * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sum_to_all" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      meep::sum_to_all((float const *)arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sum_to_all__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< float > *arg1 = (std::complex< float > *) 0 ;
  std::complex< double > *arg2 = (std::complex< double > *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "sum_to_all", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__complexT_float_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sum_to_all" "', argument " "1"" of type '" "std::complex< float > const *""'"); 
  }
  arg1 = reinterpret_cast< std::complex< float > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sum_to_all" "', argument " "2"" of type '" "std::complex< double > *""'"); 
  }
  arg2 = reinterpret_cast< std::complex< double > * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sum_to_all" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      meep::sum_to_all((std::complex< float > const *)arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sum_to_all__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< double > *arg1 = (std::complex< double > *) 0 ;
  std::complex< double > *arg2 = (std::complex< double > *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "sum_to_all", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sum_to_all" "', argument " "1"" of type '" "std::complex< double > const *""'"); 
  }
  arg1 = reinterpret_cast< std::complex< double > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sum_to_all" "', argument " "2"" of type '" "std::complex< double > *""'"); 
  }
  arg2 = reinterpret_cast< std::complex< double > * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sum_to_all" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      meep::sum_to_all((std::complex< double > const *)arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sum_to_all__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< float > *arg1 = (std::complex< float > *) 0 ;
  std::complex< float > *arg2 = (std::complex< float > *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "sum_to_all", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__complexT_float_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sum_to_all" "', argument " "1"" of type '" "std::complex< float > const *""'"); 
  }
  arg1 = reinterpret_cast< std::complex< float > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__complexT_float_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sum_to_all" "', argument " "2"" of type '" "std::complex< float > *""'"); 
  }
  arg2 = reinterpret_cast< std::complex< float > * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sum_to_all" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      meep::sum_to_all((std::complex< float > const *)arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sum_to_master__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< float > *arg1 = (std::complex< float > *) 0 ;
  std::complex< float > *arg2 = (std::complex< float > *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "sum_to_master", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__complexT_float_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sum_to_master" "', argument " "1"" of type '" "std::complex< float > const *""'"); 
  }
  arg1 = reinterpret_cast< std::complex< float > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__complexT_float_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sum_to_master" "', argument " "2"" of type '" "std::complex< float > *""'"); 
  }
  arg2 = reinterpret_cast< std::complex< float > * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sum_to_master" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      meep::sum_to_master((std::complex< float > const *)arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sum_to_master__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< double > *arg1 = (std::complex< double > *) 0 ;
  std::complex< double > *arg2 = (std::complex< double > *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "sum_to_master", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sum_to_master" "', argument " "1"" of type '" "std::complex< double > const *""'"); 
  }
  arg1 = reinterpret_cast< std::complex< double > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__complexT_double_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sum_to_master" "', argument " "2"" of type '" "std::complex< double > *""'"); 
  }
  arg2 = reinterpret_cast< std::complex< double > * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sum_to_master" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      meep::sum_to_master((std::complex< double > const *)arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sum_to_all__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  long double arg1 ;
  void *argp1 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  long double result;
  
  if (!PyArg_UnpackTuple(args, "sum_to_all", 1, 1, &obj0)) SWIG_fail;
  {
    res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_long_double,  0  | 0);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sum_to_all" "', argument " "1"" of type '" "long double""'"); 
    }  
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "sum_to_all" "', argument " "1"" of type '" "long double""'");
    } else {
      long double * temp = reinterpret_cast< long double * >(argp1);
      arg1 = *temp;
      if (SWIG_IsNewObj(res1)) delete temp;
    }
  }
  {
    try {
      result = (long double)meep::sum_to_all(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new long double(static_cast< const long double& >(result))), SWIGTYPE_p_long_double, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sum_to_all__SWIG_8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::complex< double > arg1 ;
  std::complex< double > val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "sum_to_all", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "sum_to_all" "', argument " "1"" of type '" "std::complex< double >""'");
  } 
  arg1 = static_cast< std::complex< double > >(val1);
  {
    try {
      result = meep::sum_to_all(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sum_to_all__SWIG_9(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  SwigValueWrapper< std::complex< long double > > arg1 ;
  void *argp1 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  SwigValueWrapper< std::complex< long double > > result;
  
  if (!PyArg_UnpackTuple(args, "sum_to_all", 1, 1, &obj0)) SWIG_fail;
  {
    res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_std__complexT_long_double_t,  0  | 0);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sum_to_all" "', argument " "1"" of type '" "std::complex< long double >""'"); 
    }  
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "sum_to_all" "', argument " "1"" of type '" "std::complex< long double >""'");
    } else {
      std::complex< long double > * temp = reinterpret_cast< std::complex< long double > * >(argp1);
      arg1 = *temp;
      if (SWIG_IsNewObj(res1)) delete temp;
    }
  }
  {
    try {
      result = meep::sum_to_all(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new std::complex< long double >(static_cast< const std::complex< long double >& >(result))), SWIGTYPE_p_std__complexT_long_double_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sum_to_all__SWIG_10(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "sum_to_all", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "sum_to_all" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    try {
      result = (int)meep::sum_to_all(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_partial_sum_to_all__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "partial_sum_to_all", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "partial_sum_to_all" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    try {
      result = (int)meep::partial_sum_to_all(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sum_to_all__SWIG_11(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  size_t arg1 ;
  size_t val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  size_t result;
  
  if (!PyArg_UnpackTuple(args, "sum_to_all", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "sum_to_all" "', argument " "1"" of type '" "size_t""'");
  } 
  arg1 = static_cast< size_t >(val1);
  {
    try {
      result = meep::sum_to_all(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_partial_sum_to_all__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  size_t arg1 ;
  size_t val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  size_t result;
  
  if (!PyArg_UnpackTuple(args, "partial_sum_to_all", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "partial_sum_to_all" "', argument " "1"" of type '" "size_t""'");
  } 
  arg1 = static_cast< size_t >(val1);
  {
    try {
      result = meep::partial_sum_to_all(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_partial_sum_to_all(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[2] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_partial_sum_to_all__SWIG_0(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_partial_sum_to_all__SWIG_1(self, args);
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'partial_sum_to_all'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::partial_sum_to_all(int)\n"
    "    meep::partial_sum_to_all(size_t)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_sum_to_all__SWIG_12(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  size_t *arg1 = (size_t *) 0 ;
  size_t *arg2 = (size_t *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "sum_to_all", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sum_to_all" "', argument " "1"" of type '" "size_t const *""'"); 
  }
  arg1 = reinterpret_cast< size_t * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sum_to_all" "', argument " "2"" of type '" "size_t *""'"); 
  }
  arg2 = reinterpret_cast< size_t * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sum_to_all" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      meep::sum_to_all((size_t const *)arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sum_to_all(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_long_double, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_sum_to_all__SWIG_7(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_std__complexT_long_double_t, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_sum_to_all__SWIG_9(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_int(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_sum_to_all__SWIG_10(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_sum_to_all__SWIG_11(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_sum_to_all__SWIG_0(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_sum_to_all__SWIG_8(self, args);
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__complexT_float_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__complexT_float_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_sum_to_all__SWIG_6(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_float, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_float, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_sum_to_all__SWIG_1(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_double, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_double, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_sum_to_all__SWIG_2(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_float, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_double, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_sum_to_all__SWIG_3(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__complexT_float_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__complexT_double_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_sum_to_all__SWIG_4(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__complexT_double_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__complexT_double_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_sum_to_all__SWIG_5(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_size_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_size_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_sum_to_all__SWIG_12(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'sum_to_all'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::sum_to_all(double)\n"
    "    meep::sum_to_all(float const *,float *,int)\n"
    "    meep::sum_to_all(double const *,double *,int)\n"
    "    meep::sum_to_all(float const *,double *,int)\n"
    "    meep::sum_to_all(std::complex< float > const *,std::complex< double > *,int)\n"
    "    meep::sum_to_all(std::complex< double > const *,std::complex< double > *,int)\n"
    "    meep::sum_to_all(std::complex< float > const *,std::complex< float > *,int)\n"
    "    meep::sum_to_all(long double)\n"
    "    meep::sum_to_all(std::complex< double >)\n"
    "    meep::sum_to_all(std::complex< long double >)\n"
    "    meep::sum_to_all(int)\n"
    "    meep::sum_to_all(size_t)\n"
    "    meep::sum_to_all(size_t const *,size_t *,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_sum_to_master__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  size_t *arg1 = (size_t *) 0 ;
  size_t *arg2 = (size_t *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "sum_to_master", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sum_to_master" "', argument " "1"" of type '" "size_t const *""'"); 
  }
  arg1 = reinterpret_cast< size_t * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sum_to_master" "', argument " "2"" of type '" "size_t *""'"); 
  }
  arg2 = reinterpret_cast< size_t * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sum_to_master" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      meep::sum_to_master((size_t const *)arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sum_to_master(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_float(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_sum_to_master__SWIG_0(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_sum_to_master__SWIG_1(self, args);
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_float, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_float, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_sum_to_master__SWIG_2(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_double, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_double, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_sum_to_master__SWIG_3(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__complexT_float_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__complexT_float_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_sum_to_master__SWIG_4(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_std__complexT_double_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_std__complexT_double_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_sum_to_master__SWIG_5(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_size_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_size_t, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_sum_to_master__SWIG_6(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'sum_to_master'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::sum_to_master(float)\n"
    "    meep::sum_to_master(double)\n"
    "    meep::sum_to_master(float const *,float *,int)\n"
    "    meep::sum_to_master(double const *,double *,int)\n"
    "    meep::sum_to_master(std::complex< float > const *,std::complex< float > *,int)\n"
    "    meep::sum_to_master(std::complex< double > const *,std::complex< double > *,int)\n"
    "    meep::sum_to_master(size_t const *,size_t *,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_or_to_all__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  bool arg1 ;
  bool val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "or_to_all", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_bool(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "or_to_all" "', argument " "1"" of type '" "bool""'");
  } 
  arg1 = static_cast< bool >(val1);
  {
    try {
      result = (bool)meep::or_to_all(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_or_to_all__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int *arg1 = (int *) 0 ;
  int *arg2 = (int *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "or_to_all", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "or_to_all" "', argument " "1"" of type '" "int const *""'"); 
  }
  arg1 = reinterpret_cast< int * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "or_to_all" "', argument " "2"" of type '" "int *""'"); 
  }
  arg2 = reinterpret_cast< int * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "or_to_all" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      meep::or_to_all((int const *)arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_or_to_all(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_bool(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_or_to_all__SWIG_0(self, args);
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_int, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_int, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_or_to_all__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'or_to_all'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::or_to_all(bool)\n"
    "    meep::or_to_all(int const *,int *,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_bw_or_to_all(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  size_t *arg1 = (size_t *) 0 ;
  size_t *arg2 = (size_t *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "bw_or_to_all", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bw_or_to_all" "', argument " "1"" of type '" "size_t const *""'"); 
  }
  arg1 = reinterpret_cast< size_t * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_size_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "bw_or_to_all" "', argument " "2"" of type '" "size_t *""'"); 
  }
  arg2 = reinterpret_cast< size_t * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "bw_or_to_all" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      meep::bw_or_to_all((size_t const *)arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_and_to_all__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  bool arg1 ;
  bool val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "and_to_all", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_bool(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "and_to_all" "', argument " "1"" of type '" "bool""'");
  } 
  arg1 = static_cast< bool >(val1);
  {
    try {
      result = (bool)meep::and_to_all(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_and_to_all__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int *arg1 = (int *) 0 ;
  int *arg2 = (int *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "and_to_all", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "and_to_all" "', argument " "1"" of type '" "int const *""'"); 
  }
  arg1 = reinterpret_cast< int * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "and_to_all" "', argument " "2"" of type '" "int *""'"); 
  }
  arg2 = reinterpret_cast< int * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "and_to_all" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      meep::and_to_all((int const *)arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_and_to_all(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_bool(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_and_to_all__SWIG_0(self, args);
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_int, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_int, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_and_to_all__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'and_to_all'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::and_to_all(bool)\n"
    "    meep::and_to_all(int const *,int *,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_master_printf__varargs__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *varargs) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  void *arg2 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "master_printf", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "master_printf" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    try {
      meep::master_printf((char const *)arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_master_printf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj;
  PyObject *varargs;
  PyObject *newargs;
  
  newargs = PyTuple_GetSlice(args,0,1);
  varargs = PyTuple_GetSlice(args,1,PyTuple_Size(args));
  resultobj = _wrap_master_printf__varargs__(NULL,newargs,varargs);
  Py_XDECREF(newargs);
  Py_XDECREF(varargs);
  return resultobj;
}


SWIGINTERN PyObject *_wrap_master_printf_stderr__varargs__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *varargs) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  void *arg2 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "master_printf_stderr", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "master_printf_stderr" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    try {
      meep::master_printf_stderr((char const *)arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_master_printf_stderr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj;
  PyObject *varargs;
  PyObject *newargs;
  
  newargs = PyTuple_GetSlice(args,0,1);
  varargs = PyTuple_GetSlice(args,1,PyTuple_Size(args));
  resultobj = _wrap_master_printf_stderr__varargs__(NULL,newargs,varargs);
  Py_XDECREF(newargs);
  Py_XDECREF(varargs);
  return resultobj;
}


SWIGINTERN PyObject *_wrap_debug_printf__varargs__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *varargs) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  void *arg2 = 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "debug_printf", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "debug_printf" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    try {
      meep::debug_printf((char const *)arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_debug_printf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj;
  PyObject *varargs;
  PyObject *newargs;
  
  newargs = PyTuple_GetSlice(args,0,1);
  varargs = PyTuple_GetSlice(args,1,PyTuple_Size(args));
  resultobj = _wrap_debug_printf__varargs__(NULL,newargs,varargs);
  Py_XDECREF(newargs);
  Py_XDECREF(varargs);
  return resultobj;
}


SWIGINTERN PyObject *_wrap_master_fprintf__varargs__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *varargs) {
  PyObject *resultobj = 0;
  FILE *arg1 = (FILE *) 0 ;
  char *arg2 = (char *) 0 ;
  void *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "master_fprintf", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "master_fprintf" "', argument " "1"" of type '" "FILE *""'"); 
  }
  arg1 = reinterpret_cast< FILE * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "master_fprintf" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try {
      meep::master_fprintf(arg1,(char const *)arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_master_fprintf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj;
  PyObject *varargs;
  PyObject *newargs;
  
  newargs = PyTuple_GetSlice(args,0,2);
  varargs = PyTuple_GetSlice(args,2,PyTuple_Size(args));
  resultobj = _wrap_master_fprintf__varargs__(NULL,newargs,varargs);
  Py_XDECREF(newargs);
  Py_XDECREF(varargs);
  return resultobj;
}


SWIGINTERN PyObject *_wrap_master_fopen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  FILE *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "master_fopen", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "master_fopen" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "master_fopen" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try {
      result = (FILE *)meep::master_fopen((char const *)arg1,(char const *)arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FILE, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_master_fclose(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  FILE *arg1 = (FILE *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "master_fclose", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "master_fclose" "', argument " "1"" of type '" "FILE *""'"); 
  }
  arg1 = reinterpret_cast< FILE * >(argp1);
  {
    try {
      meep::master_fclose(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_set_meep_printf_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::meep_printf_callback_func arg1 = (meep::meep_printf_callback_func) 0 ;
  PyObject * obj0 = 0 ;
  meep::meep_printf_callback_func result;
  
  if (!PyArg_UnpackTuple(args, "set_meep_printf_callback", 1, 1, &obj0)) SWIG_fail;
  {
    int res = SWIG_ConvertFunctionPtr(obj0, (void**)(&arg1), SWIGTYPE_p_f_p_q_const__char__void);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "set_meep_printf_callback" "', argument " "1"" of type '" "meep::meep_printf_callback_func""'"); 
    }
  }
  {
    try {
      result = (meep::meep_printf_callback_func)meep::set_meep_printf_callback(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_q_const__char__void);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_set_meep_printf_stderr_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::meep_printf_callback_func arg1 = (meep::meep_printf_callback_func) 0 ;
  PyObject * obj0 = 0 ;
  meep::meep_printf_callback_func result;
  
  if (!PyArg_UnpackTuple(args, "set_meep_printf_stderr_callback", 1, 1, &obj0)) SWIG_fail;
  {
    int res = SWIG_ConvertFunctionPtr(obj0, (void**)(&arg1), SWIGTYPE_p_f_p_q_const__char__void);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "set_meep_printf_stderr_callback" "', argument " "1"" of type '" "meep::meep_printf_callback_func""'"); 
    }
  }
  {
    try {
      result = (meep::meep_printf_callback_func)meep::set_meep_printf_stderr_callback(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_q_const__char__void);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_begin_critical_section(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "begin_critical_section", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "begin_critical_section" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    try {
      meep::begin_critical_section(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_end_critical_section(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "end_critical_section", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "end_critical_section" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    try {
      meep::end_critical_section(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_divide_parallel_processes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "divide_parallel_processes", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "divide_parallel_processes" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    try {
      result = (int)meep::divide_parallel_processes(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_begin_global_communications(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  
  if (!PyArg_UnpackTuple(args, "begin_global_communications", 0, 0)) SWIG_fail;
  {
    try {
      meep::begin_global_communications();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_end_global_communications(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  
  if (!PyArg_UnpackTuple(args, "end_global_communications", 0, 0)) SWIG_fail;
  {
    try {
      meep::end_global_communications();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_end_divide_parallel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  
  if (!PyArg_UnpackTuple(args, "end_divide_parallel", 0, 0)) SWIG_fail;
  {
    try {
      meep::end_divide_parallel();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_my_global_rank(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int result;
  
  if (!PyArg_UnpackTuple(args, "my_global_rank", 0, 0)) SWIG_fail;
  {
    try {
      result = (int)meep::my_global_rank();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN int Swig_var_CYLINDRICAL_set(PyObject *) {
  SWIG_Error(SWIG_AttributeError,"Variable CYLINDRICAL is read-only.");
  return 1;
}


SWIGINTERN PyObject *Swig_var_CYLINDRICAL_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_From_int(static_cast< int >(meep_geom::CYLINDRICAL));
  return pyobj;
}


SWIGINTERN int Swig_var_X_DIR_set(PyObject *) {
  SWIG_Error(SWIG_AttributeError,"Variable X_DIR is read-only.");
  return 1;
}


SWIGINTERN PyObject *Swig_var_X_DIR_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_From_int(static_cast< int >(meep_geom::X_DIR));
  return pyobj;
}


SWIGINTERN int Swig_var_Y_DIR_set(PyObject *) {
  SWIG_Error(SWIG_AttributeError,"Variable Y_DIR is read-only.");
  return 1;
}


SWIGINTERN PyObject *Swig_var_Y_DIR_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_From_int(static_cast< int >(meep_geom::Y_DIR));
  return pyobj;
}


SWIGINTERN int Swig_var_Z_DIR_set(PyObject *) {
  SWIG_Error(SWIG_AttributeError,"Variable Z_DIR is read-only.");
  return 1;
}


SWIGINTERN PyObject *Swig_var_Z_DIR_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_From_int(static_cast< int >(meep_geom::Z_DIR));
  return pyobj;
}


SWIGINTERN int Swig_var_R_DIR_set(PyObject *) {
  SWIG_Error(SWIG_AttributeError,"Variable R_DIR is read-only.");
  return 1;
}


SWIGINTERN PyObject *Swig_var_R_DIR_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_From_int(static_cast< int >(meep_geom::R_DIR));
  return pyobj;
}


SWIGINTERN int Swig_var_PHI_DIR_set(PyObject *) {
  SWIG_Error(SWIG_AttributeError,"Variable PHI_DIR is read-only.");
  return 1;
}


SWIGINTERN PyObject *Swig_var_PHI_DIR_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_From_int(static_cast< int >(meep_geom::PHI_DIR));
  return pyobj;
}


SWIGINTERN int Swig_var_ALL_SIDES_set(PyObject *) {
  SWIG_Error(SWIG_AttributeError,"Variable ALL_SIDES is read-only.");
  return 1;
}


SWIGINTERN PyObject *Swig_var_ALL_SIDES_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_From_int(static_cast< int >(meep_geom::ALL_SIDES));
  return pyobj;
}


SWIGINTERN int Swig_var_ALL_DIRECTIONS_set(PyObject *) {
  SWIG_Error(SWIG_AttributeError,"Variable ALL_DIRECTIONS is read-only.");
  return 1;
}


SWIGINTERN PyObject *Swig_var_ALL_DIRECTIONS_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_From_int(static_cast< int >(meep_geom::ALL_DIRECTIONS));
  return pyobj;
}


SWIGINTERN int Swig_var_ENORMOUS_set(PyObject *) {
  SWIG_Error(SWIG_AttributeError,"Variable ENORMOUS is read-only.");
  return 1;
}


SWIGINTERN PyObject *Swig_var_ENORMOUS_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_From_double(static_cast< double >(meep_geom::ENORMOUS));
  return pyobj;
}


SWIGINTERN int Swig_var_TINY_set(PyObject *) {
  SWIG_Error(SWIG_AttributeError,"Variable TINY is read-only.");
  return 1;
}


SWIGINTERN PyObject *Swig_var_TINY_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_From_double(static_cast< double >(meep_geom::TINY));
  return pyobj;
}


SWIGINTERN PyObject *_wrap_dft_data_num_freqs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::dft_data *arg1 = (meep_geom::dft_data *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_data_num_freqs_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__dft_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_data_num_freqs_set" "', argument " "1"" of type '" "meep_geom::dft_data *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::dft_data * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_data_num_freqs_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  if (arg1) (arg1)->num_freqs = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_data_num_freqs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::dft_data *arg1 = (meep_geom::dft_data *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "dft_data_num_freqs_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__dft_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_data_num_freqs_get" "', argument " "1"" of type '" "meep_geom::dft_data *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::dft_data * >(argp1);
  result = (int) ((arg1)->num_freqs);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_data_num_components_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::dft_data *arg1 = (meep_geom::dft_data *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_data_num_components_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__dft_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_data_num_components_set" "', argument " "1"" of type '" "meep_geom::dft_data *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::dft_data * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dft_data_num_components_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  if (arg1) (arg1)->num_components = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_data_num_components_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::dft_data *arg1 = (meep_geom::dft_data *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "dft_data_num_components_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__dft_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_data_num_components_get" "', argument " "1"" of type '" "meep_geom::dft_data *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::dft_data * >(argp1);
  result = (int) ((arg1)->num_components);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_data_vols_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::dft_data *arg1 = (meep_geom::dft_data *) 0 ;
  std::vector< meep::volume,std::allocator< meep::volume > > *arg2 = (std::vector< meep::volume,std::allocator< meep::volume > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_data_vols_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__dft_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_data_vols_set" "', argument " "1"" of type '" "meep_geom::dft_data *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::dft_data * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dft_data_vols_set" "', argument " "2"" of type '" "std::vector< meep::volume,std::allocator< meep::volume > > *""'"); 
  }
  arg2 = reinterpret_cast< std::vector< meep::volume,std::allocator< meep::volume > > * >(argp2);
  if (arg1) (arg1)->vols = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dft_data_vols_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::dft_data *arg1 = (meep_geom::dft_data *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::volume,std::allocator< meep::volume > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "dft_data_vols_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__dft_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dft_data_vols_get" "', argument " "1"" of type '" "meep_geom::dft_data *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::dft_data * >(argp1);
  result = (std::vector< meep::volume,std::allocator< meep::volume > > *)& ((arg1)->vols);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_dft_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  std::vector< meep::volume,std::allocator< meep::volume > > arg3 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep_geom::dft_data *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_dft_data", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_dft_data" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_dft_data" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    std::vector< meep::volume,std::allocator< meep::volume > > *ptr = (std::vector< meep::volume,std::allocator< meep::volume > > *)0;
    int res = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "new_dft_data" "', argument " "3"" of type '" "std::vector< meep::volume,std::allocator< meep::volume > >""'"); 
    }
    arg3 = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  {
    try {
      result = (meep_geom::dft_data *)new meep_geom::dft_data(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep_geom__dft_data, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_dft_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::dft_data *arg1 = (meep_geom::dft_data *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_dft_data", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__dft_data, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_dft_data" "', argument " "1"" of type '" "meep_geom::dft_data *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::dft_data * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *dft_data_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep_geom__dft_data, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *dft_data_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN int Swig_var_fragment_stats_tol_set(PyObject *_val) {
  {
    double val;
    int res = SWIG_AsVal_double(_val, &val);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""meep_geom::fragment_stats::tol""' of type '""double""'");
    }
    meep_geom::fragment_stats::tol = static_cast< double >(val);
  }
  return 0;
fail:
  return 1;
}


SWIGINTERN PyObject *Swig_var_fragment_stats_tol_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_From_double(static_cast< double >(meep_geom::fragment_stats::tol));
  return pyobj;
}


SWIGINTERN PyObject *_wrap_fragment_stats_tol_get(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(args)) {
  return Swig_var_fragment_stats_tol_get();
}


SWIGINTERN PyObject *_wrap_fragment_stats_tol_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  int res;
  PyObject *value;
  
  if (!PyArg_ParseTuple(args, "O:set", &value)) return NULL;
  res = Swig_var_fragment_stats_tol_set(value);
  return !res ? SWIG_Py_Void() : NULL;
}


SWIGINTERN int Swig_var_fragment_stats_maxeval_set(PyObject *_val) {
  {
    int val;
    int res = SWIG_AsVal_int(_val, &val);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""meep_geom::fragment_stats::maxeval""' of type '""int""'");
    }
    meep_geom::fragment_stats::maxeval = static_cast< int >(val);
  }
  return 0;
fail:
  return 1;
}


SWIGINTERN PyObject *Swig_var_fragment_stats_maxeval_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_From_int(static_cast< int >(meep_geom::fragment_stats::maxeval));
  return pyobj;
}


SWIGINTERN PyObject *_wrap_fragment_stats_maxeval_get(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(args)) {
  return Swig_var_fragment_stats_maxeval_get();
}


SWIGINTERN PyObject *_wrap_fragment_stats_maxeval_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  int res;
  PyObject *value;
  
  if (!PyArg_ParseTuple(args, "O:set", &value)) return NULL;
  res = Swig_var_fragment_stats_maxeval_set(value);
  return !res ? SWIG_Py_Void() : NULL;
}


SWIGINTERN int Swig_var_fragment_stats_resolution_set(PyObject *_val) {
  {
    int val;
    int res = SWIG_AsVal_int(_val, &val);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""meep_geom::fragment_stats::resolution""' of type '""int""'");
    }
    meep_geom::fragment_stats::resolution = static_cast< int >(val);
  }
  return 0;
fail:
  return 1;
}


SWIGINTERN PyObject *Swig_var_fragment_stats_resolution_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_From_int(static_cast< int >(meep_geom::fragment_stats::resolution));
  return pyobj;
}


SWIGINTERN PyObject *_wrap_fragment_stats_resolution_get(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(args)) {
  return Swig_var_fragment_stats_resolution_get();
}


SWIGINTERN PyObject *_wrap_fragment_stats_resolution_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  int res;
  PyObject *value;
  
  if (!PyArg_ParseTuple(args, "O:set", &value)) return NULL;
  res = Swig_var_fragment_stats_resolution_set(value);
  return !res ? SWIG_Py_Void() : NULL;
}


SWIGINTERN int Swig_var_fragment_stats_dims_set(PyObject *_val) {
  if (sizeof(int) != sizeof(meep_geom::fragment_stats::dims)) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_AttributeError), "in variable '""arch, read-only meep_geom::fragment_stats::dims""' of type '""meep::ndim""'");
  }  else {
    int ecode = SWIG_AsVal_int (_val, reinterpret_cast< int* >(&meep_geom::fragment_stats::dims));
    if (!SWIG_IsOK(ecode)) {
      SWIG_exception_fail(SWIG_ArgError(ecode), "in variable '""meep_geom::fragment_stats::dims""' of type '""meep::ndim""'");
    }
  }
  return 0;
fail:
  return 1;
}


SWIGINTERN PyObject *Swig_var_fragment_stats_dims_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_From_int(static_cast< int >(meep_geom::fragment_stats::dims));
  return pyobj;
}


SWIGINTERN PyObject *_wrap_fragment_stats_dims_get(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(args)) {
  return Swig_var_fragment_stats_dims_get();
}


SWIGINTERN PyObject *_wrap_fragment_stats_dims_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  int res;
  PyObject *value;
  
  if (!PyArg_ParseTuple(args, "O:set", &value)) return NULL;
  res = Swig_var_fragment_stats_dims_set(value);
  return !res ? SWIG_Py_Void() : NULL;
}


SWIGINTERN int Swig_var_fragment_stats_geom_set(PyObject *_val) {
  {
    void *argp = 0;
    int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_geometric_object_list,  0  | 0);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""meep_geom::fragment_stats::geom""' of type '""geometric_object_list""'");
    }
    if (!argp) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""meep_geom::fragment_stats::geom""' of type '""geometric_object_list""'");
    } else {
      geometric_object_list * temp;
      temp  = reinterpret_cast< geometric_object_list * >(argp);
      meep_geom::fragment_stats::geom = *temp;
      if (SWIG_IsNewObj(res)) delete temp;
    }
  }
  return 0;
fail:
  return 1;
}


SWIGINTERN PyObject *Swig_var_fragment_stats_geom_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&meep_geom::fragment_stats::geom), SWIGTYPE_p_geometric_object_list,  0 );
  return pyobj;
}


SWIGINTERN PyObject *_wrap_fragment_stats_geom_get(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(args)) {
  return Swig_var_fragment_stats_geom_get();
}


SWIGINTERN PyObject *_wrap_fragment_stats_geom_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  int res;
  PyObject *value;
  
  if (!PyArg_ParseTuple(args, "O:set", &value)) return NULL;
  res = Swig_var_fragment_stats_geom_set(value);
  return !res ? SWIG_Py_Void() : NULL;
}


SWIGINTERN int Swig_var_fragment_stats_dft_data_list_set(PyObject *_val) {
  {
    std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > *ptr = (std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > *)0;
    int res = swig::asptr(_val, &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in variable '""meep_geom::fragment_stats::dft_data_list""' of type '""std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >""'"); 
    }
    meep_geom::fragment_stats::dft_data_list = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  return 0;
fail:
  return 1;
}


SWIGINTERN PyObject *Swig_var_fragment_stats_dft_data_list_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = swig::from(static_cast< std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > >(meep_geom::fragment_stats::dft_data_list));
  return pyobj;
}


SWIGINTERN PyObject *_wrap_fragment_stats_dft_data_list_get(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(args)) {
  return Swig_var_fragment_stats_dft_data_list_get();
}


SWIGINTERN PyObject *_wrap_fragment_stats_dft_data_list_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  int res;
  PyObject *value;
  
  if (!PyArg_ParseTuple(args, "O:set", &value)) return NULL;
  res = Swig_var_fragment_stats_dft_data_list_set(value);
  return !res ? SWIG_Py_Void() : NULL;
}


SWIGINTERN int Swig_var_fragment_stats_pml_1d_vols_set(PyObject *_val) {
  {
    std::vector< meep::volume,std::allocator< meep::volume > > *ptr = (std::vector< meep::volume,std::allocator< meep::volume > > *)0;
    int res = swig::asptr(_val, &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in variable '""meep_geom::fragment_stats::pml_1d_vols""' of type '""std::vector< meep::volume,std::allocator< meep::volume > >""'"); 
    }
    meep_geom::fragment_stats::pml_1d_vols = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  return 0;
fail:
  return 1;
}


SWIGINTERN PyObject *Swig_var_fragment_stats_pml_1d_vols_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = swig::from(static_cast< std::vector< meep::volume,std::allocator< meep::volume > > >(meep_geom::fragment_stats::pml_1d_vols));
  return pyobj;
}


SWIGINTERN PyObject *_wrap_fragment_stats_pml_1d_vols_get(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(args)) {
  return Swig_var_fragment_stats_pml_1d_vols_get();
}


SWIGINTERN PyObject *_wrap_fragment_stats_pml_1d_vols_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  int res;
  PyObject *value;
  
  if (!PyArg_ParseTuple(args, "O:set", &value)) return NULL;
  res = Swig_var_fragment_stats_pml_1d_vols_set(value);
  return !res ? SWIG_Py_Void() : NULL;
}


SWIGINTERN int Swig_var_fragment_stats_pml_2d_vols_set(PyObject *_val) {
  {
    std::vector< meep::volume,std::allocator< meep::volume > > *ptr = (std::vector< meep::volume,std::allocator< meep::volume > > *)0;
    int res = swig::asptr(_val, &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in variable '""meep_geom::fragment_stats::pml_2d_vols""' of type '""std::vector< meep::volume,std::allocator< meep::volume > >""'"); 
    }
    meep_geom::fragment_stats::pml_2d_vols = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  return 0;
fail:
  return 1;
}


SWIGINTERN PyObject *Swig_var_fragment_stats_pml_2d_vols_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = swig::from(static_cast< std::vector< meep::volume,std::allocator< meep::volume > > >(meep_geom::fragment_stats::pml_2d_vols));
  return pyobj;
}


SWIGINTERN PyObject *_wrap_fragment_stats_pml_2d_vols_get(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(args)) {
  return Swig_var_fragment_stats_pml_2d_vols_get();
}


SWIGINTERN PyObject *_wrap_fragment_stats_pml_2d_vols_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  int res;
  PyObject *value;
  
  if (!PyArg_ParseTuple(args, "O:set", &value)) return NULL;
  res = Swig_var_fragment_stats_pml_2d_vols_set(value);
  return !res ? SWIG_Py_Void() : NULL;
}


SWIGINTERN int Swig_var_fragment_stats_pml_3d_vols_set(PyObject *_val) {
  {
    std::vector< meep::volume,std::allocator< meep::volume > > *ptr = (std::vector< meep::volume,std::allocator< meep::volume > > *)0;
    int res = swig::asptr(_val, &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in variable '""meep_geom::fragment_stats::pml_3d_vols""' of type '""std::vector< meep::volume,std::allocator< meep::volume > >""'"); 
    }
    meep_geom::fragment_stats::pml_3d_vols = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  return 0;
fail:
  return 1;
}


SWIGINTERN PyObject *Swig_var_fragment_stats_pml_3d_vols_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = swig::from(static_cast< std::vector< meep::volume,std::allocator< meep::volume > > >(meep_geom::fragment_stats::pml_3d_vols));
  return pyobj;
}


SWIGINTERN PyObject *_wrap_fragment_stats_pml_3d_vols_get(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(args)) {
  return Swig_var_fragment_stats_pml_3d_vols_get();
}


SWIGINTERN PyObject *_wrap_fragment_stats_pml_3d_vols_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  int res;
  PyObject *value;
  
  if (!PyArg_ParseTuple(args, "O:set", &value)) return NULL;
  res = Swig_var_fragment_stats_pml_3d_vols_set(value);
  return !res ? SWIG_Py_Void() : NULL;
}


SWIGINTERN int Swig_var_fragment_stats_absorber_vols_set(PyObject *_val) {
  {
    std::vector< meep::volume,std::allocator< meep::volume > > *ptr = (std::vector< meep::volume,std::allocator< meep::volume > > *)0;
    int res = swig::asptr(_val, &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in variable '""meep_geom::fragment_stats::absorber_vols""' of type '""std::vector< meep::volume,std::allocator< meep::volume > >""'"); 
    }
    meep_geom::fragment_stats::absorber_vols = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  return 0;
fail:
  return 1;
}


SWIGINTERN PyObject *Swig_var_fragment_stats_absorber_vols_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = swig::from(static_cast< std::vector< meep::volume,std::allocator< meep::volume > > >(meep_geom::fragment_stats::absorber_vols));
  return pyobj;
}


SWIGINTERN PyObject *_wrap_fragment_stats_absorber_vols_get(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(args)) {
  return Swig_var_fragment_stats_absorber_vols_get();
}


SWIGINTERN PyObject *_wrap_fragment_stats_absorber_vols_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  int res;
  PyObject *value;
  
  if (!PyArg_ParseTuple(args, "O:set", &value)) return NULL;
  res = Swig_var_fragment_stats_absorber_vols_set(value);
  return !res ? SWIG_Py_Void() : NULL;
}


SWIGINTERN int Swig_var_fragment_stats_extra_materials_set(PyObject *_val) {
  {
    void *argp = 0;
    int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_material_type_list,  0  | 0);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""meep_geom::fragment_stats::extra_materials""' of type '""material_type_list""'");
    }
    if (!argp) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""meep_geom::fragment_stats::extra_materials""' of type '""material_type_list""'");
    } else {
      material_type_list * temp;
      temp  = reinterpret_cast< material_type_list * >(argp);
      meep_geom::fragment_stats::extra_materials = *temp;
      if (SWIG_IsNewObj(res)) delete temp;
    }
  }
  return 0;
fail:
  return 1;
}


SWIGINTERN PyObject *Swig_var_fragment_stats_extra_materials_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&meep_geom::fragment_stats::extra_materials), SWIGTYPE_p_material_type_list,  0 );
  return pyobj;
}


SWIGINTERN PyObject *_wrap_fragment_stats_extra_materials_get(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(args)) {
  return Swig_var_fragment_stats_extra_materials_get();
}


SWIGINTERN PyObject *_wrap_fragment_stats_extra_materials_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  int res;
  PyObject *value;
  
  if (!PyArg_ParseTuple(args, "O:set", &value)) return NULL;
  res = Swig_var_fragment_stats_extra_materials_set(value);
  return !res ? SWIG_Py_Void() : NULL;
}


SWIGINTERN int Swig_var_fragment_stats_split_chunks_evenly_set(PyObject *_val) {
  {
    bool val;
    int res = SWIG_AsVal_bool(_val, &val);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""meep_geom::fragment_stats::split_chunks_evenly""' of type '""bool""'");
    }
    meep_geom::fragment_stats::split_chunks_evenly = static_cast< bool >(val);
  }
  return 0;
fail:
  return 1;
}


SWIGINTERN PyObject *Swig_var_fragment_stats_split_chunks_evenly_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_From_bool(static_cast< bool >(meep_geom::fragment_stats::split_chunks_evenly));
  return pyobj;
}


SWIGINTERN PyObject *_wrap_fragment_stats_split_chunks_evenly_get(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(args)) {
  return Swig_var_fragment_stats_split_chunks_evenly_get();
}


SWIGINTERN PyObject *_wrap_fragment_stats_split_chunks_evenly_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  int res;
  PyObject *value;
  
  if (!PyArg_ParseTuple(args, "O:set", &value)) return NULL;
  res = Swig_var_fragment_stats_split_chunks_evenly_set(value);
  return !res ? SWIG_Py_Void() : NULL;
}


SWIGINTERN int Swig_var_fragment_stats_eps_averaging_set(PyObject *_val) {
  {
    bool val;
    int res = SWIG_AsVal_bool(_val, &val);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in variable '""meep_geom::fragment_stats::eps_averaging""' of type '""bool""'");
    }
    meep_geom::fragment_stats::eps_averaging = static_cast< bool >(val);
  }
  return 0;
fail:
  return 1;
}


SWIGINTERN PyObject *Swig_var_fragment_stats_eps_averaging_get(void) {
  PyObject *pyobj = 0;
  
  pyobj = SWIG_From_bool(static_cast< bool >(meep_geom::fragment_stats::eps_averaging));
  return pyobj;
}


SWIGINTERN PyObject *_wrap_fragment_stats_eps_averaging_get(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(args)) {
  return Swig_var_fragment_stats_eps_averaging_get();
}


SWIGINTERN PyObject *_wrap_fragment_stats_eps_averaging_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  int res;
  PyObject *value;
  
  if (!PyArg_ParseTuple(args, "O:set", &value)) return NULL;
  res = Swig_var_fragment_stats_eps_averaging_set(value);
  return !res ? SWIG_Py_Void() : NULL;
}


SWIGINTERN PyObject *_wrap_fragment_stats_has_non_medium_material(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_has_non_medium_material", 0, 0)) SWIG_fail;
  {
    try {
      result = (bool)meep_geom::fragment_stats::has_non_medium_material();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fragment_stats_num_anisotropic_eps_pixels_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_num_anisotropic_eps_pixels_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fragment_stats_num_anisotropic_eps_pixels_set" "', argument " "1"" of type '" "meep_geom::fragment_stats *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fragment_stats_num_anisotropic_eps_pixels_set" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  if (arg1) (arg1)->num_anisotropic_eps_pixels = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fragment_stats_num_anisotropic_eps_pixels_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  size_t result;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_num_anisotropic_eps_pixels_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fragment_stats_num_anisotropic_eps_pixels_get" "', argument " "1"" of type '" "meep_geom::fragment_stats *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  result =  ((arg1)->num_anisotropic_eps_pixels);
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fragment_stats_num_anisotropic_mu_pixels_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_num_anisotropic_mu_pixels_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fragment_stats_num_anisotropic_mu_pixels_set" "', argument " "1"" of type '" "meep_geom::fragment_stats *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fragment_stats_num_anisotropic_mu_pixels_set" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  if (arg1) (arg1)->num_anisotropic_mu_pixels = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fragment_stats_num_anisotropic_mu_pixels_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  size_t result;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_num_anisotropic_mu_pixels_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fragment_stats_num_anisotropic_mu_pixels_get" "', argument " "1"" of type '" "meep_geom::fragment_stats *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  result =  ((arg1)->num_anisotropic_mu_pixels);
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fragment_stats_num_nonlinear_pixels_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_num_nonlinear_pixels_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fragment_stats_num_nonlinear_pixels_set" "', argument " "1"" of type '" "meep_geom::fragment_stats *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fragment_stats_num_nonlinear_pixels_set" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  if (arg1) (arg1)->num_nonlinear_pixels = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fragment_stats_num_nonlinear_pixels_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  size_t result;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_num_nonlinear_pixels_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fragment_stats_num_nonlinear_pixels_get" "', argument " "1"" of type '" "meep_geom::fragment_stats *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  result =  ((arg1)->num_nonlinear_pixels);
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fragment_stats_num_susceptibility_pixels_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_num_susceptibility_pixels_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fragment_stats_num_susceptibility_pixels_set" "', argument " "1"" of type '" "meep_geom::fragment_stats *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fragment_stats_num_susceptibility_pixels_set" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  if (arg1) (arg1)->num_susceptibility_pixels = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fragment_stats_num_susceptibility_pixels_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  size_t result;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_num_susceptibility_pixels_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fragment_stats_num_susceptibility_pixels_get" "', argument " "1"" of type '" "meep_geom::fragment_stats *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  result =  ((arg1)->num_susceptibility_pixels);
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fragment_stats_num_nonzero_conductivity_pixels_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_num_nonzero_conductivity_pixels_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fragment_stats_num_nonzero_conductivity_pixels_set" "', argument " "1"" of type '" "meep_geom::fragment_stats *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fragment_stats_num_nonzero_conductivity_pixels_set" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  if (arg1) (arg1)->num_nonzero_conductivity_pixels = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fragment_stats_num_nonzero_conductivity_pixels_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  size_t result;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_num_nonzero_conductivity_pixels_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fragment_stats_num_nonzero_conductivity_pixels_get" "', argument " "1"" of type '" "meep_geom::fragment_stats *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  result =  ((arg1)->num_nonzero_conductivity_pixels);
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fragment_stats_num_1d_pml_pixels_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_num_1d_pml_pixels_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fragment_stats_num_1d_pml_pixels_set" "', argument " "1"" of type '" "meep_geom::fragment_stats *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fragment_stats_num_1d_pml_pixels_set" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  if (arg1) (arg1)->num_1d_pml_pixels = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fragment_stats_num_1d_pml_pixels_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  size_t result;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_num_1d_pml_pixels_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fragment_stats_num_1d_pml_pixels_get" "', argument " "1"" of type '" "meep_geom::fragment_stats *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  result =  ((arg1)->num_1d_pml_pixels);
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fragment_stats_num_2d_pml_pixels_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_num_2d_pml_pixels_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fragment_stats_num_2d_pml_pixels_set" "', argument " "1"" of type '" "meep_geom::fragment_stats *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fragment_stats_num_2d_pml_pixels_set" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  if (arg1) (arg1)->num_2d_pml_pixels = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fragment_stats_num_2d_pml_pixels_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  size_t result;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_num_2d_pml_pixels_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fragment_stats_num_2d_pml_pixels_get" "', argument " "1"" of type '" "meep_geom::fragment_stats *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  result =  ((arg1)->num_2d_pml_pixels);
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fragment_stats_num_3d_pml_pixels_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_num_3d_pml_pixels_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fragment_stats_num_3d_pml_pixels_set" "', argument " "1"" of type '" "meep_geom::fragment_stats *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fragment_stats_num_3d_pml_pixels_set" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  if (arg1) (arg1)->num_3d_pml_pixels = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fragment_stats_num_3d_pml_pixels_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  size_t result;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_num_3d_pml_pixels_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fragment_stats_num_3d_pml_pixels_get" "', argument " "1"" of type '" "meep_geom::fragment_stats *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  result =  ((arg1)->num_3d_pml_pixels);
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fragment_stats_num_dft_pixels_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_num_dft_pixels_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fragment_stats_num_dft_pixels_set" "', argument " "1"" of type '" "meep_geom::fragment_stats *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fragment_stats_num_dft_pixels_set" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  if (arg1) (arg1)->num_dft_pixels = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fragment_stats_num_dft_pixels_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  size_t result;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_num_dft_pixels_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fragment_stats_num_dft_pixels_get" "', argument " "1"" of type '" "meep_geom::fragment_stats *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  result =  ((arg1)->num_dft_pixels);
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fragment_stats_num_pixels_in_box_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_num_pixels_in_box_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fragment_stats_num_pixels_in_box_set" "', argument " "1"" of type '" "meep_geom::fragment_stats *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fragment_stats_num_pixels_in_box_set" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  if (arg1) (arg1)->num_pixels_in_box = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fragment_stats_num_pixels_in_box_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  size_t result;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_num_pixels_in_box_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fragment_stats_num_pixels_in_box_get" "', argument " "1"" of type '" "meep_geom::fragment_stats *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  result =  ((arg1)->num_pixels_in_box);
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fragment_stats_box_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  geom_box *arg2 = (geom_box *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_box_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fragment_stats_box_set" "', argument " "1"" of type '" "meep_geom::fragment_stats *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_geom_box, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fragment_stats_box_set" "', argument " "2"" of type '" "geom_box *""'"); 
  }
  arg2 = reinterpret_cast< geom_box * >(argp2);
  if (arg1) (arg1)->box = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fragment_stats_box_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  geom_box *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_box_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fragment_stats_box_get" "', argument " "1"" of type '" "meep_geom::fragment_stats *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  result = (geom_box *)& ((arg1)->box);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_geom_box, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_fragment_stats__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_fragment_stats", 0, 0)) SWIG_fail;
  {
    try {
      result = (meep_geom::fragment_stats *)new meep_geom::fragment_stats();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep_geom__fragment_stats, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_fragment_stats__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  geom_box *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep_geom::fragment_stats *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_fragment_stats", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_geom_box,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_fragment_stats" "', argument " "1"" of type '" "geom_box &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_fragment_stats" "', argument " "1"" of type '" "geom_box &""'"); 
  }
  arg1 = reinterpret_cast< geom_box * >(argp1);
  {
    try {
      result = (meep_geom::fragment_stats *)new meep_geom::fragment_stats(*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep_geom__fragment_stats, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_fragment_stats(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[2] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_fragment_stats__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_geom_box, SWIG_POINTER_NO_NULL);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_fragment_stats__SWIG_1(self, args);
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_fragment_stats'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep_geom::fragment_stats::fragment_stats()\n"
    "    meep_geom::fragment_stats::fragment_stats(geom_box &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_fragment_stats_compute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_compute", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fragment_stats_compute" "', argument " "1"" of type '" "meep_geom::fragment_stats *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  {
    try {
      (arg1)->compute();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fragment_stats_cost(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_cost", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fragment_stats_cost" "', argument " "1"" of type '" "meep_geom::fragment_stats const *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  {
    try {
      result = (double)((meep_geom::fragment_stats const *)arg1)->cost();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fragment_stats_print_stats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fragment_stats_print_stats", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fragment_stats_print_stats" "', argument " "1"" of type '" "meep_geom::fragment_stats const *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  {
    try {
      ((meep_geom::fragment_stats const *)arg1)->print_stats();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_fragment_stats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::fragment_stats *arg1 = (meep_geom::fragment_stats *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_fragment_stats", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__fragment_stats, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_fragment_stats" "', argument " "1"" of type '" "meep_geom::fragment_stats *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::fragment_stats * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *fragment_stats_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep_geom__fragment_stats, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *fragment_stats_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_compute_fragment_stats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  geometric_object_list arg1 ;
  meep::grid_volume *arg2 = (meep::grid_volume *) 0 ;
  vector3 arg3 ;
  vector3 arg4 ;
  material_type arg5 ;
  std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > arg6 ;
  std::vector< meep::volume,std::allocator< meep::volume > > arg7 ;
  std::vector< meep::volume,std::allocator< meep::volume > > arg8 ;
  std::vector< meep::volume,std::allocator< meep::volume > > arg9 ;
  std::vector< meep::volume,std::allocator< meep::volume > > arg10 ;
  material_type_list arg11 ;
  double arg12 ;
  int arg13 ;
  bool arg14 ;
  bool arg15 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val12 ;
  int ecode12 = 0 ;
  int val13 ;
  int ecode13 = 0 ;
  bool val14 ;
  int ecode14 = 0 ;
  bool val15 ;
  int ecode15 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  PyObject * obj14 = 0 ;
  meep_geom::fragment_stats result;
  
  {
    (&arg1)->num_items = 0;
    (&arg1)->items = NULL;
  }
  {
    arg5 = NULL;
  }
  {
    (&arg11)->num_items = 0;
    (&arg11)->items = NULL;
  }
  if (!PyArg_UnpackTuple(args, "compute_fragment_stats", 15, 15, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13, &obj14)) SWIG_fail;
  {
    if(!py_list_to_gobj_list(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "compute_fragment_stats" "', argument " "2"" of type '" "meep::grid_volume *""'"); 
  }
  arg2 = reinterpret_cast< meep::grid_volume * >(argp2);
  {
    if(!pyv3_to_v3(obj2, &arg3)) {
      SWIG_fail;
    }
  }
  {
    if(!pyv3_to_v3(obj3, &arg4)) {
      SWIG_fail;
    }
  }
  {
    if(!pymaterial_to_material(obj4, &arg5)) {
      SWIG_fail;
    }
  }
  {
    std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > *ptr = (std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > *)0;
    int res = swig::asptr(obj5, &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "compute_fragment_stats" "', argument " "6"" of type '" "std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >""'"); 
    }
    arg6 = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  {
    std::vector< meep::volume,std::allocator< meep::volume > > *ptr = (std::vector< meep::volume,std::allocator< meep::volume > > *)0;
    int res = swig::asptr(obj6, &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "compute_fragment_stats" "', argument " "7"" of type '" "std::vector< meep::volume,std::allocator< meep::volume > >""'"); 
    }
    arg7 = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  {
    std::vector< meep::volume,std::allocator< meep::volume > > *ptr = (std::vector< meep::volume,std::allocator< meep::volume > > *)0;
    int res = swig::asptr(obj7, &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "compute_fragment_stats" "', argument " "8"" of type '" "std::vector< meep::volume,std::allocator< meep::volume > >""'"); 
    }
    arg8 = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  {
    std::vector< meep::volume,std::allocator< meep::volume > > *ptr = (std::vector< meep::volume,std::allocator< meep::volume > > *)0;
    int res = swig::asptr(obj8, &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "compute_fragment_stats" "', argument " "9"" of type '" "std::vector< meep::volume,std::allocator< meep::volume > >""'"); 
    }
    arg9 = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  {
    std::vector< meep::volume,std::allocator< meep::volume > > *ptr = (std::vector< meep::volume,std::allocator< meep::volume > > *)0;
    int res = swig::asptr(obj9, &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "compute_fragment_stats" "', argument " "10"" of type '" "std::vector< meep::volume,std::allocator< meep::volume > >""'"); 
    }
    arg10 = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  {
    Py_ssize_t len = PyList_Size(obj10);
    
    if (len == 0) {
      arg11 = material_type_list();
    } else {
      material_type_list mtl;
      mtl.num_items = len;
      mtl.items = new material_type[len];
      for (Py_ssize_t i = 0; i < len; i++) {
        PyObject *py_material = PyList_GetItem(obj10, i);
        if (!pymaterial_to_material(py_material, &mtl.items[i])) {
          SWIG_fail;
        }
      }
      arg11 = mtl;
    }
  }
  ecode12 = SWIG_AsVal_double(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "compute_fragment_stats" "', argument " "12"" of type '" "double""'");
  } 
  arg12 = static_cast< double >(val12);
  ecode13 = SWIG_AsVal_int(obj12, &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "compute_fragment_stats" "', argument " "13"" of type '" "int""'");
  } 
  arg13 = static_cast< int >(val13);
  ecode14 = SWIG_AsVal_bool(obj13, &val14);
  if (!SWIG_IsOK(ecode14)) {
    SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "compute_fragment_stats" "', argument " "14"" of type '" "bool""'");
  } 
  arg14 = static_cast< bool >(val14);
  ecode15 = SWIG_AsVal_bool(obj14, &val15);
  if (!SWIG_IsOK(ecode15)) {
    SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "compute_fragment_stats" "', argument " "15"" of type '" "bool""'");
  } 
  arg15 = static_cast< bool >(val15);
  {
    try {
      result = meep_geom::compute_fragment_stats(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep_geom::fragment_stats(static_cast< const meep_geom::fragment_stats& >(result))), SWIGTYPE_p_meep_geom__fragment_stats, SWIG_POINTER_OWN |  0 );
  {
    gobj_list_freearg(&arg1);
  }
  {
    if (arg5) {
      material_free(arg5);
    }
  }
  {
    if ((&arg11)->num_items != 0) {
      for (int i = 0; i < (&arg11)->num_items; i++) {
        material_free((&arg11)->items[i]);
      }
    }
    delete[] (&arg11)->items;
  }
  return resultobj;
fail:
  {
    gobj_list_freearg(&arg1);
  }
  {
    if (arg5) {
      material_free(arg5);
    }
  }
  {
    if ((&arg11)->num_items != 0) {
      for (int i = 0; i < (&arg11)->num_items; i++) {
        material_free((&arg11)->items[i]);
      }
    }
    delete[] (&arg11)->items;
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_absorber_thickness_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::absorber *arg1 = (meep_geom::absorber *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "absorber_thickness_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__absorber, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "absorber_thickness_set" "', argument " "1"" of type '" "meep_geom::absorber *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::absorber * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "absorber_thickness_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->thickness = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_absorber_thickness_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::absorber *arg1 = (meep_geom::absorber *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "absorber_thickness_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__absorber, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "absorber_thickness_get" "', argument " "1"" of type '" "meep_geom::absorber *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::absorber * >(argp1);
  result = (double) ((arg1)->thickness);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_absorber_direction_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::absorber *arg1 = (meep_geom::absorber *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "absorber_direction_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__absorber, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "absorber_direction_set" "', argument " "1"" of type '" "meep_geom::absorber *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::absorber * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "absorber_direction_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  if (arg1) (arg1)->direction = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_absorber_direction_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::absorber *arg1 = (meep_geom::absorber *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "absorber_direction_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__absorber, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "absorber_direction_get" "', argument " "1"" of type '" "meep_geom::absorber *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::absorber * >(argp1);
  result = (int) ((arg1)->direction);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_absorber_side_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::absorber *arg1 = (meep_geom::absorber *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "absorber_side_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__absorber, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "absorber_side_set" "', argument " "1"" of type '" "meep_geom::absorber *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::absorber * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "absorber_side_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  if (arg1) (arg1)->side = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_absorber_side_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::absorber *arg1 = (meep_geom::absorber *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "absorber_side_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__absorber, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "absorber_side_get" "', argument " "1"" of type '" "meep_geom::absorber *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::absorber * >(argp1);
  result = (int) ((arg1)->side);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_absorber_R_asymptotic_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::absorber *arg1 = (meep_geom::absorber *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "absorber_R_asymptotic_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__absorber, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "absorber_R_asymptotic_set" "', argument " "1"" of type '" "meep_geom::absorber *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::absorber * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "absorber_R_asymptotic_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->R_asymptotic = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_absorber_R_asymptotic_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::absorber *arg1 = (meep_geom::absorber *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "absorber_R_asymptotic_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__absorber, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "absorber_R_asymptotic_get" "', argument " "1"" of type '" "meep_geom::absorber *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::absorber * >(argp1);
  result = (double) ((arg1)->R_asymptotic);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_absorber_mean_stretch_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::absorber *arg1 = (meep_geom::absorber *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "absorber_mean_stretch_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__absorber, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "absorber_mean_stretch_set" "', argument " "1"" of type '" "meep_geom::absorber *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::absorber * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "absorber_mean_stretch_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->mean_stretch = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_absorber_mean_stretch_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::absorber *arg1 = (meep_geom::absorber *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "absorber_mean_stretch_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__absorber, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "absorber_mean_stretch_get" "', argument " "1"" of type '" "meep_geom::absorber *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::absorber * >(argp1);
  result = (double) ((arg1)->mean_stretch);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_absorber_pml_profile_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::absorber *arg1 = (meep_geom::absorber *) 0 ;
  meep::pml_profile_func arg2 = (meep::pml_profile_func) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "absorber_pml_profile_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__absorber, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "absorber_pml_profile_set" "', argument " "1"" of type '" "meep_geom::absorber *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::absorber * >(argp1);
  {
    int res = SWIG_ConvertFunctionPtr(obj1, (void**)(&arg2), SWIGTYPE_p_f_double_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "absorber_pml_profile_set" "', argument " "2"" of type '" "meep::pml_profile_func""'"); 
    }
  }
  if (arg1) (arg1)->pml_profile = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_absorber_pml_profile_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::absorber *arg1 = (meep_geom::absorber *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::pml_profile_func result;
  
  if (!PyArg_UnpackTuple(args, "absorber_pml_profile_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__absorber, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "absorber_pml_profile_get" "', argument " "1"" of type '" "meep_geom::absorber *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::absorber * >(argp1);
  result = (meep::pml_profile_func) ((arg1)->pml_profile);
  resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_double_p_void__double);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_absorber_pml_profile_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::absorber *arg1 = (meep_geom::absorber *) 0 ;
  void *arg2 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "absorber_pml_profile_data_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__absorber, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "absorber_pml_profile_data_set" "', argument " "1"" of type '" "meep_geom::absorber *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::absorber * >(argp1);
  {
    arg2 = (void*)obj1;
  }
  if (arg1) (arg1)->pml_profile_data = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_absorber_pml_profile_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::absorber *arg1 = (meep_geom::absorber *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  void *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "absorber_pml_profile_data_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__absorber, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "absorber_pml_profile_data_get" "', argument " "1"" of type '" "meep_geom::absorber *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::absorber * >(argp1);
  result = (void *) ((arg1)->pml_profile_data);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_absorber(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::absorber *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_absorber", 0, 0)) SWIG_fail;
  {
    try {
      result = (meep_geom::absorber *)new meep_geom::absorber();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep_geom__absorber, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_absorber(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::absorber *arg1 = (meep_geom::absorber *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_absorber", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__absorber, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_absorber" "', argument " "1"" of type '" "meep_geom::absorber *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::absorber * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *absorber_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep_geom__absorber, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *absorber_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_create_absorber_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::absorber_list result;
  
  if (!PyArg_UnpackTuple(args, "create_absorber_list", 0, 0)) SWIG_fail;
  {
    try {
      result = (meep_geom::absorber_list)meep_geom::create_absorber_list();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep_geom__absorber_std__allocatorT_meep_geom__absorber_t_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_destroy_absorber_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::absorber_list arg1 = (meep_geom::absorber_list) 0 ;
  PyObject * obj0 = 0 ;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "destroy_absorber_list", 1, 1, &obj0)) SWIG_fail;
  {
    Py_ssize_t len = PyList_Size(obj0);
    
    if (len == 0) {
      arg1 = 0;
    } else {
      arg1 = create_absorber_list();
      
      for (Py_ssize_t i = 0; i < len; i++) {
        absorber a;
        PyObject *py_absorber = PyList_GetItem(obj0, i);
        
        if (!pyabsorber_to_absorber(py_absorber, &a)) {
          SWIG_fail;
        }
        
        add_absorbing_layer(arg1, a.thickness, a.direction, a.side,
          a.R_asymptotic, a.mean_stretch, py_pml_profile,
          a.pml_profile_data);
        Py_DECREF((PyObject *)a.pml_profile_data);
      }
    }
  }
  {
    try {
      meep_geom::destroy_absorber_list(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    destroy_absorber_list(arg1);
  }
  return resultobj;
fail:
  {
    destroy_absorber_list(arg1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_add_absorbing_layer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::absorber_list arg1 = (meep_geom::absorber_list) 0 ;
  double arg2 ;
  int arg3 ;
  int arg4 ;
  double arg5 ;
  double arg6 ;
  meep::pml_profile_func arg7 = (meep::pml_profile_func) 0 ;
  void *arg8 = (void *) 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  int res8 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "add_absorbing_layer", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  {
    Py_ssize_t len = PyList_Size(obj0);
    
    if (len == 0) {
      arg1 = 0;
    } else {
      arg1 = create_absorber_list();
      
      for (Py_ssize_t i = 0; i < len; i++) {
        absorber a;
        PyObject *py_absorber = PyList_GetItem(obj0, i);
        
        if (!pyabsorber_to_absorber(py_absorber, &a)) {
          SWIG_fail;
        }
        
        add_absorbing_layer(arg1, a.thickness, a.direction, a.side,
          a.R_asymptotic, a.mean_stretch, py_pml_profile,
          a.pml_profile_data);
        Py_DECREF((PyObject *)a.pml_profile_data);
      }
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "add_absorbing_layer" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "add_absorbing_layer" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "add_absorbing_layer" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "add_absorbing_layer" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "add_absorbing_layer" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  {
    int res = SWIG_ConvertFunctionPtr(obj6, (void**)(&arg7), SWIGTYPE_p_f_double_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "add_absorbing_layer" "', argument " "7"" of type '" "meep::pml_profile_func""'"); 
    }
  }
  res8 = SWIG_ConvertPtr(obj7,SWIG_as_voidptrptr(&arg8), 0, 0);
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "add_absorbing_layer" "', argument " "8"" of type '" "void *""'"); 
  }
  {
    try {
      meep_geom::add_absorbing_layer(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    destroy_absorber_list(arg1);
  }
  return resultobj;
fail:
  {
    destroy_absorber_list(arg1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_add_absorbing_layer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::absorber_list arg1 = (meep_geom::absorber_list) 0 ;
  double arg2 ;
  int arg3 ;
  int arg4 ;
  double arg5 ;
  double arg6 ;
  meep::pml_profile_func arg7 = (meep::pml_profile_func) 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "add_absorbing_layer", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  {
    Py_ssize_t len = PyList_Size(obj0);
    
    if (len == 0) {
      arg1 = 0;
    } else {
      arg1 = create_absorber_list();
      
      for (Py_ssize_t i = 0; i < len; i++) {
        absorber a;
        PyObject *py_absorber = PyList_GetItem(obj0, i);
        
        if (!pyabsorber_to_absorber(py_absorber, &a)) {
          SWIG_fail;
        }
        
        add_absorbing_layer(arg1, a.thickness, a.direction, a.side,
          a.R_asymptotic, a.mean_stretch, py_pml_profile,
          a.pml_profile_data);
        Py_DECREF((PyObject *)a.pml_profile_data);
      }
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "add_absorbing_layer" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "add_absorbing_layer" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "add_absorbing_layer" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "add_absorbing_layer" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "add_absorbing_layer" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  {
    int res = SWIG_ConvertFunctionPtr(obj6, (void**)(&arg7), SWIGTYPE_p_f_double_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "add_absorbing_layer" "', argument " "7"" of type '" "meep::pml_profile_func""'"); 
    }
  }
  {
    try {
      meep_geom::add_absorbing_layer(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    destroy_absorber_list(arg1);
  }
  return resultobj;
fail:
  {
    destroy_absorber_list(arg1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_add_absorbing_layer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::absorber_list arg1 = (meep_geom::absorber_list) 0 ;
  double arg2 ;
  int arg3 ;
  int arg4 ;
  double arg5 ;
  double arg6 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "add_absorbing_layer", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  {
    Py_ssize_t len = PyList_Size(obj0);
    
    if (len == 0) {
      arg1 = 0;
    } else {
      arg1 = create_absorber_list();
      
      for (Py_ssize_t i = 0; i < len; i++) {
        absorber a;
        PyObject *py_absorber = PyList_GetItem(obj0, i);
        
        if (!pyabsorber_to_absorber(py_absorber, &a)) {
          SWIG_fail;
        }
        
        add_absorbing_layer(arg1, a.thickness, a.direction, a.side,
          a.R_asymptotic, a.mean_stretch, py_pml_profile,
          a.pml_profile_data);
        Py_DECREF((PyObject *)a.pml_profile_data);
      }
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "add_absorbing_layer" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "add_absorbing_layer" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "add_absorbing_layer" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "add_absorbing_layer" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "add_absorbing_layer" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  {
    try {
      meep_geom::add_absorbing_layer(arg1,arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    destroy_absorber_list(arg1);
  }
  return resultobj;
fail:
  {
    destroy_absorber_list(arg1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_add_absorbing_layer__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::absorber_list arg1 = (meep_geom::absorber_list) 0 ;
  double arg2 ;
  int arg3 ;
  int arg4 ;
  double arg5 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "add_absorbing_layer", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  {
    Py_ssize_t len = PyList_Size(obj0);
    
    if (len == 0) {
      arg1 = 0;
    } else {
      arg1 = create_absorber_list();
      
      for (Py_ssize_t i = 0; i < len; i++) {
        absorber a;
        PyObject *py_absorber = PyList_GetItem(obj0, i);
        
        if (!pyabsorber_to_absorber(py_absorber, &a)) {
          SWIG_fail;
        }
        
        add_absorbing_layer(arg1, a.thickness, a.direction, a.side,
          a.R_asymptotic, a.mean_stretch, py_pml_profile,
          a.pml_profile_data);
        Py_DECREF((PyObject *)a.pml_profile_data);
      }
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "add_absorbing_layer" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "add_absorbing_layer" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "add_absorbing_layer" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "add_absorbing_layer" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      meep_geom::add_absorbing_layer(arg1,arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    destroy_absorber_list(arg1);
  }
  return resultobj;
fail:
  {
    destroy_absorber_list(arg1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_add_absorbing_layer__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::absorber_list arg1 = (meep_geom::absorber_list) 0 ;
  double arg2 ;
  int arg3 ;
  int arg4 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "add_absorbing_layer", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  {
    Py_ssize_t len = PyList_Size(obj0);
    
    if (len == 0) {
      arg1 = 0;
    } else {
      arg1 = create_absorber_list();
      
      for (Py_ssize_t i = 0; i < len; i++) {
        absorber a;
        PyObject *py_absorber = PyList_GetItem(obj0, i);
        
        if (!pyabsorber_to_absorber(py_absorber, &a)) {
          SWIG_fail;
        }
        
        add_absorbing_layer(arg1, a.thickness, a.direction, a.side,
          a.R_asymptotic, a.mean_stretch, py_pml_profile,
          a.pml_profile_data);
        Py_DECREF((PyObject *)a.pml_profile_data);
      }
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "add_absorbing_layer" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "add_absorbing_layer" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "add_absorbing_layer" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    try {
      meep_geom::add_absorbing_layer(arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    destroy_absorber_list(arg1);
  }
  return resultobj;
fail:
  {
    destroy_absorber_list(arg1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_add_absorbing_layer__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::absorber_list arg1 = (meep_geom::absorber_list) 0 ;
  double arg2 ;
  int arg3 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "add_absorbing_layer", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  {
    Py_ssize_t len = PyList_Size(obj0);
    
    if (len == 0) {
      arg1 = 0;
    } else {
      arg1 = create_absorber_list();
      
      for (Py_ssize_t i = 0; i < len; i++) {
        absorber a;
        PyObject *py_absorber = PyList_GetItem(obj0, i);
        
        if (!pyabsorber_to_absorber(py_absorber, &a)) {
          SWIG_fail;
        }
        
        add_absorbing_layer(arg1, a.thickness, a.direction, a.side,
          a.R_asymptotic, a.mean_stretch, py_pml_profile,
          a.pml_profile_data);
        Py_DECREF((PyObject *)a.pml_profile_data);
      }
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "add_absorbing_layer" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "add_absorbing_layer" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      meep_geom::add_absorbing_layer(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    destroy_absorber_list(arg1);
  }
  return resultobj;
fail:
  {
    destroy_absorber_list(arg1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_add_absorbing_layer__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::absorber_list arg1 = (meep_geom::absorber_list) 0 ;
  double arg2 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "add_absorbing_layer", 2, 2, &obj0, &obj1)) SWIG_fail;
  {
    Py_ssize_t len = PyList_Size(obj0);
    
    if (len == 0) {
      arg1 = 0;
    } else {
      arg1 = create_absorber_list();
      
      for (Py_ssize_t i = 0; i < len; i++) {
        absorber a;
        PyObject *py_absorber = PyList_GetItem(obj0, i);
        
        if (!pyabsorber_to_absorber(py_absorber, &a)) {
          SWIG_fail;
        }
        
        add_absorbing_layer(arg1, a.thickness, a.direction, a.side,
          a.R_asymptotic, a.mean_stretch, py_pml_profile,
          a.pml_profile_data);
        Py_DECREF((PyObject *)a.pml_profile_data);
      }
    }
  }
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "add_absorbing_layer" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      meep_geom::add_absorbing_layer(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    destroy_absorber_list(arg1);
  }
  return resultobj;
fail:
  {
    destroy_absorber_list(arg1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_add_absorbing_layer(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[9] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 8) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    {
      _v = PySequence_Check(argv[0]);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_add_absorbing_layer__SWIG_6(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = PySequence_Check(argv[0]);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_add_absorbing_layer__SWIG_5(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      _v = PySequence_Check(argv[0]);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_add_absorbing_layer__SWIG_4(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      _v = PySequence_Check(argv[0]);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_add_absorbing_layer__SWIG_3(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    {
      _v = PySequence_Check(argv[0]);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_add_absorbing_layer__SWIG_2(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    {
      _v = PySequence_Check(argv[0]);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                void *ptr = 0;
                int res = SWIG_ConvertFunctionPtr(argv[6], &ptr, SWIGTYPE_p_f_double_p_void__double);
                _v = SWIG_CheckState(res);
                if (_v) {
                  return _wrap_add_absorbing_layer__SWIG_1(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    {
      _v = PySequence_Check(argv[0]);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                void *ptr = 0;
                int res = SWIG_ConvertFunctionPtr(argv[6], &ptr, SWIGTYPE_p_f_double_p_void__double);
                _v = SWIG_CheckState(res);
                if (_v) {
                  void *ptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &ptr, 0, 0);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    return _wrap_add_absorbing_layer__SWIG_0(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'add_absorbing_layer'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep_geom::add_absorbing_layer(meep_geom::absorber_list,double,int,int,double,double,meep::pml_profile_func,void *)\n"
    "    meep_geom::add_absorbing_layer(meep_geom::absorber_list,double,int,int,double,double,meep::pml_profile_func)\n"
    "    meep_geom::add_absorbing_layer(meep_geom::absorber_list,double,int,int,double,double)\n"
    "    meep_geom::add_absorbing_layer(meep_geom::absorber_list,double,int,int,double)\n"
    "    meep_geom::add_absorbing_layer(meep_geom::absorber_list,double,int,int)\n"
    "    meep_geom::add_absorbing_layer(meep_geom::absorber_list,double,int)\n"
    "    meep_geom::add_absorbing_layer(meep_geom::absorber_list,double)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_make_vector3__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  vector3 result;
  
  if (!PyArg_UnpackTuple(args, "make_vector3", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "make_vector3" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "make_vector3" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "make_vector3" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      result = meep_geom::make_vector3(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new vector3(static_cast< const vector3& >(result))), SWIGTYPE_p_vector3, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_make_vector3__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  vector3 result;
  
  if (!PyArg_UnpackTuple(args, "make_vector3", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "make_vector3" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "make_vector3" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = meep_geom::make_vector3(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new vector3(static_cast< const vector3& >(result))), SWIGTYPE_p_vector3, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_make_vector3__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  vector3 result;
  
  if (!PyArg_UnpackTuple(args, "make_vector3", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "make_vector3" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  {
    try {
      result = meep_geom::make_vector3(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new vector3(static_cast< const vector3& >(result))), SWIGTYPE_p_vector3, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_make_vector3__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  vector3 result;
  
  if (!PyArg_UnpackTuple(args, "make_vector3", 0, 0)) SWIG_fail;
  {
    try {
      result = meep_geom::make_vector3();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new vector3(static_cast< const vector3& >(result))), SWIGTYPE_p_vector3, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_make_vector3(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_make_vector3__SWIG_3(self, args);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_make_vector3__SWIG_2(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_make_vector3__SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_make_vector3__SWIG_0(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'make_vector3'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep_geom::make_vector3(double,double,double)\n"
    "    meep_geom::make_vector3(double,double)\n"
    "    meep_geom::make_vector3(double)\n"
    "    meep_geom::make_vector3()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_symm_matrix_m00_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::symm_matrix *arg1 = (meep_geom::symm_matrix *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "symm_matrix_m00_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__symm_matrix, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symm_matrix_m00_set" "', argument " "1"" of type '" "meep_geom::symm_matrix *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::symm_matrix * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "symm_matrix_m00_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->m00 = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symm_matrix_m00_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::symm_matrix *arg1 = (meep_geom::symm_matrix *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "symm_matrix_m00_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__symm_matrix, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symm_matrix_m00_get" "', argument " "1"" of type '" "meep_geom::symm_matrix *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::symm_matrix * >(argp1);
  result = (double) ((arg1)->m00);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symm_matrix_m01_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::symm_matrix *arg1 = (meep_geom::symm_matrix *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "symm_matrix_m01_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__symm_matrix, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symm_matrix_m01_set" "', argument " "1"" of type '" "meep_geom::symm_matrix *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::symm_matrix * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "symm_matrix_m01_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->m01 = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symm_matrix_m01_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::symm_matrix *arg1 = (meep_geom::symm_matrix *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "symm_matrix_m01_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__symm_matrix, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symm_matrix_m01_get" "', argument " "1"" of type '" "meep_geom::symm_matrix *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::symm_matrix * >(argp1);
  result = (double) ((arg1)->m01);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symm_matrix_m02_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::symm_matrix *arg1 = (meep_geom::symm_matrix *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "symm_matrix_m02_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__symm_matrix, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symm_matrix_m02_set" "', argument " "1"" of type '" "meep_geom::symm_matrix *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::symm_matrix * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "symm_matrix_m02_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->m02 = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symm_matrix_m02_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::symm_matrix *arg1 = (meep_geom::symm_matrix *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "symm_matrix_m02_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__symm_matrix, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symm_matrix_m02_get" "', argument " "1"" of type '" "meep_geom::symm_matrix *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::symm_matrix * >(argp1);
  result = (double) ((arg1)->m02);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symm_matrix_m11_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::symm_matrix *arg1 = (meep_geom::symm_matrix *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "symm_matrix_m11_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__symm_matrix, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symm_matrix_m11_set" "', argument " "1"" of type '" "meep_geom::symm_matrix *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::symm_matrix * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "symm_matrix_m11_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->m11 = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symm_matrix_m11_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::symm_matrix *arg1 = (meep_geom::symm_matrix *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "symm_matrix_m11_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__symm_matrix, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symm_matrix_m11_get" "', argument " "1"" of type '" "meep_geom::symm_matrix *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::symm_matrix * >(argp1);
  result = (double) ((arg1)->m11);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symm_matrix_m12_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::symm_matrix *arg1 = (meep_geom::symm_matrix *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "symm_matrix_m12_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__symm_matrix, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symm_matrix_m12_set" "', argument " "1"" of type '" "meep_geom::symm_matrix *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::symm_matrix * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "symm_matrix_m12_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->m12 = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symm_matrix_m12_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::symm_matrix *arg1 = (meep_geom::symm_matrix *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "symm_matrix_m12_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__symm_matrix, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symm_matrix_m12_get" "', argument " "1"" of type '" "meep_geom::symm_matrix *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::symm_matrix * >(argp1);
  result = (double) ((arg1)->m12);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symm_matrix_m22_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::symm_matrix *arg1 = (meep_geom::symm_matrix *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "symm_matrix_m22_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__symm_matrix, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symm_matrix_m22_set" "', argument " "1"" of type '" "meep_geom::symm_matrix *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::symm_matrix * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "symm_matrix_m22_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->m22 = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_symm_matrix_m22_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::symm_matrix *arg1 = (meep_geom::symm_matrix *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "symm_matrix_m22_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__symm_matrix, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "symm_matrix_m22_get" "', argument " "1"" of type '" "meep_geom::symm_matrix *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::symm_matrix * >(argp1);
  result = (double) ((arg1)->m22);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_symm_matrix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::symm_matrix *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_symm_matrix", 0, 0)) SWIG_fail;
  {
    try {
      result = (meep_geom::symm_matrix *)new meep_geom::symm_matrix();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep_geom__symm_matrix, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_symm_matrix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::symm_matrix *arg1 = (meep_geom::symm_matrix *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_symm_matrix", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__symm_matrix, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_symm_matrix" "', argument " "1"" of type '" "meep_geom::symm_matrix *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::symm_matrix * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *symm_matrix_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep_geom__symm_matrix, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *symm_matrix_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_pol_user_s_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::pol *arg1 = (meep_geom::pol *) 0 ;
  meep_geom::susceptibility arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "pol_user_s_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__pol, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pol_user_s_set" "', argument " "1"" of type '" "meep_geom::pol *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::pol * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep_geom__susceptibility,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pol_user_s_set" "', argument " "2"" of type '" "meep_geom::susceptibility""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "pol_user_s_set" "', argument " "2"" of type '" "meep_geom::susceptibility""'");
    } else {
      meep_geom::susceptibility * temp = reinterpret_cast< meep_geom::susceptibility * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  if (arg1) (arg1)->user_s = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pol_user_s_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::pol *arg1 = (meep_geom::pol *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep_geom::susceptibility result;
  
  if (!PyArg_UnpackTuple(args, "pol_user_s_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__pol, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pol_user_s_get" "', argument " "1"" of type '" "meep_geom::pol *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::pol * >(argp1);
  result =  ((arg1)->user_s);
  resultobj = SWIG_NewPointerObj((new meep_geom::susceptibility(static_cast< const meep_geom::susceptibility& >(result))), SWIGTYPE_p_meep_geom__susceptibility, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pol_next_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::pol *arg1 = (meep_geom::pol *) 0 ;
  meep_geom::pol *arg2 = (meep_geom::pol *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "pol_next_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__pol, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pol_next_set" "', argument " "1"" of type '" "meep_geom::pol *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::pol * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep_geom__pol, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "pol_next_set" "', argument " "2"" of type '" "meep_geom::pol *""'"); 
  }
  arg2 = reinterpret_cast< meep_geom::pol * >(argp2);
  if (arg1) (arg1)->next = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_pol_next_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::pol *arg1 = (meep_geom::pol *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep_geom::pol *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "pol_next_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__pol, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pol_next_get" "', argument " "1"" of type '" "meep_geom::pol *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::pol * >(argp1);
  result = (meep_geom::pol *) ((arg1)->next);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep_geom__pol, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_pol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::pol *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_pol", 0, 0)) SWIG_fail;
  {
    try {
      result = (meep_geom::pol *)new meep_geom::pol();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep_geom__pol, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_pol(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::pol *arg1 = (meep_geom::pol *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_pol", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__pol, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_pol" "', argument " "1"" of type '" "meep_geom::pol *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::pol * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *pol_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep_geom__pol, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *pol_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_cond_profile_L_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::cond_profile *arg1 = (meep_geom::cond_profile *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "cond_profile_L_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__cond_profile, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cond_profile_L_set" "', argument " "1"" of type '" "meep_geom::cond_profile *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::cond_profile * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cond_profile_L_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->L = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_cond_profile_L_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::cond_profile *arg1 = (meep_geom::cond_profile *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "cond_profile_L_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__cond_profile, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cond_profile_L_get" "', argument " "1"" of type '" "meep_geom::cond_profile *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::cond_profile * >(argp1);
  result = (double) ((arg1)->L);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_cond_profile_N_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::cond_profile *arg1 = (meep_geom::cond_profile *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "cond_profile_N_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__cond_profile, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cond_profile_N_set" "', argument " "1"" of type '" "meep_geom::cond_profile *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::cond_profile * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cond_profile_N_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  if (arg1) (arg1)->N = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_cond_profile_N_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::cond_profile *arg1 = (meep_geom::cond_profile *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "cond_profile_N_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__cond_profile, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cond_profile_N_get" "', argument " "1"" of type '" "meep_geom::cond_profile *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::cond_profile * >(argp1);
  result = (int) ((arg1)->N);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_cond_profile_prof_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::cond_profile *arg1 = (meep_geom::cond_profile *) 0 ;
  double *arg2 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "cond_profile_prof_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__cond_profile, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cond_profile_prof_set" "', argument " "1"" of type '" "meep_geom::cond_profile *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::cond_profile * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "cond_profile_prof_set" "', argument " "2"" of type '" "double *""'"); 
  }
  arg2 = reinterpret_cast< double * >(argp2);
  if (arg1) (arg1)->prof = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_cond_profile_prof_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::cond_profile *arg1 = (meep_geom::cond_profile *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "cond_profile_prof_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__cond_profile, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cond_profile_prof_get" "', argument " "1"" of type '" "meep_geom::cond_profile *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::cond_profile * >(argp1);
  result = (double *) ((arg1)->prof);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_cond_profile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::cond_profile *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_cond_profile", 0, 0)) SWIG_fail;
  {
    try {
      result = (meep_geom::cond_profile *)new meep_geom::cond_profile();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep_geom__cond_profile, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_cond_profile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::cond_profile *arg1 = (meep_geom::cond_profile *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_cond_profile", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__cond_profile, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_cond_profile" "', argument " "1"" of type '" "meep_geom::cond_profile *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::cond_profile * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *cond_profile_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep_geom__cond_profile, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *cond_profile_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_geom_epsilon_u_p_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_u_p_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_u_p_set" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "geom_epsilon_u_p_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->u_p = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_u_p_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_u_p_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_u_p_get" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  result = (double) ((arg1)->u_p);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_geometry_tree_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  geom_box_tree arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_geometry_tree_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_geometry_tree_set" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_geom_box_tree,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "geom_epsilon_geometry_tree_set" "', argument " "2"" of type '" "geom_box_tree""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "geom_epsilon_geometry_tree_set" "', argument " "2"" of type '" "geom_box_tree""'");
    } else {
      geom_box_tree * temp = reinterpret_cast< geom_box_tree * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  if (arg1) (arg1)->geometry_tree = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_geometry_tree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  geom_box_tree result;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_geometry_tree_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_geometry_tree_get" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  result =  ((arg1)->geometry_tree);
  resultobj = SWIG_NewPointerObj((new geom_box_tree(static_cast< const geom_box_tree& >(result))), SWIGTYPE_p_geom_box_tree, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_restricted_tree_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  geom_box_tree arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_restricted_tree_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_restricted_tree_set" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_geom_box_tree,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "geom_epsilon_restricted_tree_set" "', argument " "2"" of type '" "geom_box_tree""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "geom_epsilon_restricted_tree_set" "', argument " "2"" of type '" "geom_box_tree""'");
    } else {
      geom_box_tree * temp = reinterpret_cast< geom_box_tree * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  if (arg1) (arg1)->restricted_tree = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_restricted_tree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  geom_box_tree result;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_restricted_tree_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_restricted_tree_get" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  result =  ((arg1)->restricted_tree);
  resultobj = SWIG_NewPointerObj((new geom_box_tree(static_cast< const geom_box_tree& >(result))), SWIGTYPE_p_geom_box_tree, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_geometry_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  geometric_object_list arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    (&arg2)->num_items = 0;
    (&arg2)->items = NULL;
  }
  if (!PyArg_UnpackTuple(args, "geom_epsilon_geometry_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_geometry_set" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  {
    if(!py_list_to_gobj_list(obj1, &arg2)) {
      SWIG_fail;
    }
  }
  if (arg1) (arg1)->geometry = arg2;
  resultobj = SWIG_Py_Void();
  {
    gobj_list_freearg(&arg2);
  }
  return resultobj;
fail:
  {
    gobj_list_freearg(&arg2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_geometry_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  geometric_object_list result;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_geometry_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_geometry_get" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  result =  ((arg1)->geometry);
  {
    resultobj = gobj_list_to_py_list(&result);
    
    if (!resultobj) {
      SWIG_fail;
    }
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_cond_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  meep_geom::cond_profile (*arg2)[2] ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_cond_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_cond_set" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_a_2__meep_geom__cond_profile, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "geom_epsilon_cond_set" "', argument " "2"" of type '" "meep_geom::cond_profile [5][2]""'"); 
  } 
  arg2 = reinterpret_cast< meep_geom::cond_profile (*)[2] >(argp2);
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)5; ++ii) {
        if (arg2[ii]) {
          size_t jj = 0;
          for (; jj < (size_t)2; ++jj) arg1->cond[ii][jj] = arg2[ii][jj];
        } else {
          SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""cond""' of type '""meep_geom::cond_profile [5][2]""'");
        }
      }
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""cond""' of type '""meep_geom::cond_profile [5][2]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_cond_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep_geom::cond_profile (*result)[2] = 0 ;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_cond_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_cond_get" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  result = (meep_geom::cond_profile (*)[2])(meep_geom::cond_profile (*)[2]) ((arg1)->cond);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_a_2__meep_geom__cond_profile, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_tol_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_tol_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_tol_set" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "geom_epsilon_tol_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->tol = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_tol_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_tol_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_tol_get" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  result = (double) ((arg1)->tol);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_maxeval_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_maxeval_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_maxeval_set" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "geom_epsilon_maxeval_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  if (arg1) (arg1)->maxeval = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_maxeval_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_maxeval_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_maxeval_get" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  result = (int) ((arg1)->maxeval);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_geom_epsilon__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  geometric_object_list arg1 ;
  material_type_list arg2 ;
  meep::volume *arg3 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep_geom::geom_epsilon *result = 0 ;
  
  {
    (&arg1)->num_items = 0;
    (&arg1)->items = NULL;
  }
  {
    (&arg2)->num_items = 0;
    (&arg2)->items = NULL;
  }
  if (!PyArg_UnpackTuple(args, "new_geom_epsilon", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  {
    if(!py_list_to_gobj_list(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  {
    Py_ssize_t len = PyList_Size(obj1);
    
    if (len == 0) {
      arg2 = material_type_list();
    } else {
      material_type_list mtl;
      mtl.num_items = len;
      mtl.items = new material_type[len];
      for (Py_ssize_t i = 0; i < len; i++) {
        PyObject *py_material = PyList_GetItem(obj1, i);
        if (!pymaterial_to_material(py_material, &mtl.items[i])) {
          SWIG_fail;
        }
      }
      arg2 = mtl;
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_geom_epsilon" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_geom_epsilon" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    try {
      result = (meep_geom::geom_epsilon *)new meep_geom::geom_epsilon(arg1,arg2,(meep::volume const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep_geom__geom_epsilon, SWIG_POINTER_NEW |  0 );
  {
    gobj_list_freearg(&arg1);
  }
  {
    if ((&arg2)->num_items != 0) {
      for (int i = 0; i < (&arg2)->num_items; i++) {
        material_free((&arg2)->items[i]);
      }
    }
    delete[] (&arg2)->items;
  }
  return resultobj;
fail:
  {
    gobj_list_freearg(&arg1);
  }
  {
    if ((&arg2)->num_items != 0) {
      for (int i = 0; i < (&arg2)->num_items; i++) {
        material_free((&arg2)->items[i]);
      }
    }
    delete[] (&arg2)->items;
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_geom_epsilon__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep_geom::geom_epsilon *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_geom_epsilon", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep_geom__geom_epsilon,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_geom_epsilon" "', argument " "1"" of type '" "meep_geom::geom_epsilon const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_geom_epsilon" "', argument " "1"" of type '" "meep_geom::geom_epsilon const &""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  {
    try {
      result = (meep_geom::geom_epsilon *)new meep_geom::geom_epsilon((meep_geom::geom_epsilon const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep_geom__geom_epsilon, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_geom_epsilon(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_meep_geom__geom_epsilon, SWIG_POINTER_NO_NULL | 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_geom_epsilon__SWIG_1(self, args);
    }
  }
  if (argc == 3) {
    int _v;
    {
      _v = PyList_Check(argv[0]);
    }
    if (_v) {
      {
        _v = PySequence_Check(argv[1]);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_new_geom_epsilon__SWIG_0(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_geom_epsilon'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep_geom::geom_epsilon::geom_epsilon(geometric_object_list,material_type_list,meep::volume const &)\n"
    "    meep_geom::geom_epsilon::geom_epsilon(meep_geom::geom_epsilon const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_geom_epsilon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_geom_epsilon", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_geom_epsilon" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_set_cond_profile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  meep::direction arg2 ;
  meep::boundary_side arg3 ;
  double arg4 ;
  double arg5 ;
  double (*arg6)(int,double *,void *) = (double (*)(int,double *,void *)) 0 ;
  void *arg7 = (void *) 0 ;
  double arg8 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int res7 ;
  double val8 ;
  int ecode8 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_set_cond_profile", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_set_cond_profile" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "geom_epsilon_set_cond_profile" "', argument " "2"" of type '" "meep::direction""'");
  } 
  arg2 = static_cast< meep::direction >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "geom_epsilon_set_cond_profile" "', argument " "3"" of type '" "meep::boundary_side""'");
  } 
  arg3 = static_cast< meep::boundary_side >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "geom_epsilon_set_cond_profile" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "geom_epsilon_set_cond_profile" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    int res = SWIG_ConvertFunctionPtr(obj5, (void**)(&arg6), SWIGTYPE_p_f_int_p_double_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "geom_epsilon_set_cond_profile" "', argument " "6"" of type '" "double (*)(int,double *,void *)""'"); 
    }
  }
  res7 = SWIG_ConvertPtr(obj6,SWIG_as_voidptrptr(&arg7), 0, 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "geom_epsilon_set_cond_profile" "', argument " "7"" of type '" "void *""'"); 
  }
  ecode8 = SWIG_AsVal_double(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "geom_epsilon_set_cond_profile" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  {
    try {
      (arg1)->set_cond_profile(arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_set_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  meep::volume *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_set_volume", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_set_volume" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "geom_epsilon_set_volume" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "geom_epsilon_set_volume" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    try {
      (arg1)->set_volume((meep::volume const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_unset_volume(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_unset_volume", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_unset_volume" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  {
    try {
      (arg1)->unset_volume();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_has_chi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  meep::component arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_has_chi", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_has_chi" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "geom_epsilon_has_chi" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      result = (bool)(arg1)->has_chi(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_has_chi3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  meep::component arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_has_chi3", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_has_chi3" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    try {
      result = (bool)(arg1)->has_chi3(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_has_chi2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  meep::component arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_has_chi2", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_has_chi2" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    try {
      result = (bool)(arg1)->has_chi2(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_chi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  meep::component arg2 ;
  meep::vec *arg3 = 0 ;
  int arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_chi", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_chi" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "geom_epsilon_chi" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "geom_epsilon_chi" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "geom_epsilon_chi" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    try {
      result = (double)(arg1)->chi(arg2,(meep::vec const &)*arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_chi3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  meep::component arg2 ;
  meep::vec *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_chi3", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_chi3" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "geom_epsilon_chi3" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "geom_epsilon_chi3" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  {
    try {
      result = (double)(arg1)->chi3(arg2,(meep::vec const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_chi2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  meep::component arg2 ;
  meep::vec *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_chi2", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_chi2" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "geom_epsilon_chi2" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "geom_epsilon_chi2" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  {
    try {
      result = (double)(arg1)->chi2(arg2,(meep::vec const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_has_mu(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_has_mu", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_has_mu" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  {
    try {
      result = (bool)(arg1)->has_mu();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_has_conductivity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  meep::component arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_has_conductivity", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_has_conductivity" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    try {
      result = (bool)(arg1)->has_conductivity(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_conductivity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  meep::component arg2 ;
  meep::vec *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_conductivity", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_conductivity" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "geom_epsilon_conductivity" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "geom_epsilon_conductivity" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  {
    try {
      result = (double)(arg1)->conductivity(arg2,(meep::vec const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_chi1p1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  meep::field_type arg2 ;
  meep::vec *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_chi1p1", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_chi1p1" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "geom_epsilon_chi1p1" "', argument " "2"" of type '" "meep::field_type""'");
  } 
  arg2 = static_cast< meep::field_type >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "geom_epsilon_chi1p1" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "geom_epsilon_chi1p1" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  {
    try {
      result = (double)(arg1)->chi1p1(arg2,(meep::vec const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_eff_chi1inv_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  meep::component arg2 ;
  double *arg3 ;
  meep::volume *arg4 = 0 ;
  double arg5 ;
  int arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyArrayObject *array3 = NULL ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_eff_chi1inv_row", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_eff_chi1inv_row" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    npy_intp size[1] = {
      3 
    };
    array3 = obj_to_array_no_conversion(obj2, NPY_DOUBLE);
    if (!array3 || !require_dimensions(array3,1) || !require_size(array3, size, 1) ||
      !require_contiguous(array3) || !require_native(array3)) SWIG_fail;
    arg3 = (double *) array_data(array3);
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "geom_epsilon_eff_chi1inv_row" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "geom_epsilon_eff_chi1inv_row" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  arg4 = reinterpret_cast< meep::volume * >(argp4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "geom_epsilon_eff_chi1inv_row" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "geom_epsilon_eff_chi1inv_row" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  {
    try {
      (arg1)->eff_chi1inv_row(arg2,arg3,(meep::volume const &)*arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_eff_chi1inv_matrix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  meep::component arg2 ;
  meep_geom::symm_matrix *arg3 = (meep_geom::symm_matrix *) 0 ;
  meep::volume *arg4 = 0 ;
  double arg5 ;
  int arg6 ;
  bool *arg7 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_eff_chi1inv_matrix", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_eff_chi1inv_matrix" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep_geom__symm_matrix, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "geom_epsilon_eff_chi1inv_matrix" "', argument " "3"" of type '" "meep_geom::symm_matrix *""'"); 
  }
  arg3 = reinterpret_cast< meep_geom::symm_matrix * >(argp3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "geom_epsilon_eff_chi1inv_matrix" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "geom_epsilon_eff_chi1inv_matrix" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  arg4 = reinterpret_cast< meep::volume * >(argp4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "geom_epsilon_eff_chi1inv_matrix" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "geom_epsilon_eff_chi1inv_matrix" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_bool,  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "geom_epsilon_eff_chi1inv_matrix" "', argument " "7"" of type '" "bool &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "geom_epsilon_eff_chi1inv_matrix" "', argument " "7"" of type '" "bool &""'"); 
  }
  arg7 = reinterpret_cast< bool * >(argp7);
  {
    try {
      (arg1)->eff_chi1inv_matrix(arg2,arg3,(meep::volume const &)*arg4,arg5,arg6,*arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_fallback_chi1inv_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  meep::component arg2 ;
  double *arg3 ;
  meep::volume *arg4 = 0 ;
  double arg5 ;
  int arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyArrayObject *array3 = NULL ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_fallback_chi1inv_row", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_fallback_chi1inv_row" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    npy_intp size[1] = {
      3 
    };
    array3 = obj_to_array_no_conversion(obj2, NPY_DOUBLE);
    if (!array3 || !require_dimensions(array3,1) || !require_size(array3, size, 1) ||
      !require_contiguous(array3) || !require_native(array3)) SWIG_fail;
    arg3 = (double *) array_data(array3);
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "geom_epsilon_fallback_chi1inv_row" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "geom_epsilon_fallback_chi1inv_row" "', argument " "4"" of type '" "meep::volume const &""'"); 
  }
  arg4 = reinterpret_cast< meep::volume * >(argp4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "geom_epsilon_fallback_chi1inv_row" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "geom_epsilon_fallback_chi1inv_row" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  {
    try {
      (arg1)->fallback_chi1inv_row(arg2,arg3,(meep::volume const &)*arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_sigma_row(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  meep::component arg2 ;
  double *arg3 ;
  meep::vec *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyArrayObject *array3 = NULL ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_sigma_row", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_sigma_row" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  {
    arg2 = static_cast<meep::component>(PyInteger_AsLong(obj1));
  }
  {
    npy_intp size[1] = {
      3 
    };
    array3 = obj_to_array_no_conversion(obj2, NPY_DOUBLE);
    if (!array3 || !require_dimensions(array3,1) || !require_size(array3, size, 1) ||
      !require_contiguous(array3) || !require_native(array3)) SWIG_fail;
    arg3 = (double *) array_data(array3);
  }
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "geom_epsilon_sigma_row" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "geom_epsilon_sigma_row" "', argument " "4"" of type '" "meep::vec const &""'"); 
  }
  arg4 = reinterpret_cast< meep::vec * >(argp4);
  {
    try {
      (arg1)->sigma_row(arg2,arg3,(meep::vec const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_add_susceptibilities__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  meep::structure *arg2 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_add_susceptibilities", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_add_susceptibilities" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "geom_epsilon_add_susceptibilities" "', argument " "2"" of type '" "meep::structure *""'"); 
  }
  arg2 = reinterpret_cast< meep::structure * >(argp2);
  {
    try {
      (arg1)->add_susceptibilities(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_add_susceptibilities__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  meep::field_type arg2 ;
  meep::structure *arg3 = (meep::structure *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_add_susceptibilities", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_add_susceptibilities" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "geom_epsilon_add_susceptibilities" "', argument " "2"" of type '" "meep::field_type""'");
  } 
  arg2 = static_cast< meep::field_type >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "geom_epsilon_add_susceptibilities" "', argument " "3"" of type '" "meep::structure *""'"); 
  }
  arg3 = reinterpret_cast< meep::structure * >(argp3);
  {
    try {
      (arg1)->add_susceptibilities(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_add_susceptibilities(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep_geom__geom_epsilon, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_meep__structure, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_geom_epsilon_add_susceptibilities__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep_geom__geom_epsilon, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_meep__structure, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_geom_epsilon_add_susceptibilities__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'geom_epsilon_add_susceptibilities'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep_geom::geom_epsilon::add_susceptibilities(meep::structure *)\n"
    "    meep_geom::geom_epsilon::add_susceptibilities(meep::field_type,meep::structure *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_geom_epsilon_get_material_pt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep_geom::geom_epsilon *arg1 = (meep_geom::geom_epsilon *) 0 ;
  material_type *arg2 = 0 ;
  meep::vec *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "geom_epsilon_get_material_pt", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_epsilon_get_material_pt" "', argument " "1"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg1 = reinterpret_cast< meep_geom::geom_epsilon * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_material_type,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "geom_epsilon_get_material_pt" "', argument " "2"" of type '" "material_type &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "geom_epsilon_get_material_pt" "', argument " "2"" of type '" "material_type &""'"); 
  }
  arg2 = reinterpret_cast< material_type * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "geom_epsilon_get_material_pt" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "geom_epsilon_get_material_pt" "', argument " "3"" of type '" "meep::vec const &""'"); 
  }
  arg3 = reinterpret_cast< meep::vec * >(argp3);
  {
    try {
      (arg1)->get_material_pt(*arg2,(meep::vec const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *geom_epsilon_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep_geom__geom_epsilon, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *geom_epsilon_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_set_dimensions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "set_dimensions", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "set_dimensions" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    try {
      meep_geom::set_dimensions(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_make_geom_epsilon__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  geometric_object_list *arg2 = (geometric_object_list *) 0 ;
  vector3 arg3 ;
  bool arg4 ;
  material_type arg5 ;
  material_type_list arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  geometric_object_list temp2 ;
  bool val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  meep_geom::geom_epsilon *result = 0 ;
  
  {
    arg5 = NULL;
  }
  {
    (&arg6)->num_items = 0;
    (&arg6)->items = NULL;
  }
  if (!PyArg_UnpackTuple(args, "make_geom_epsilon", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "make_geom_epsilon" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if(!py_list_to_gobj_list(obj1, &temp2)) {
      SWIG_fail;
    }
    arg2 = &temp2;
  }
  {
    if(!pyv3_to_v3(obj2, &arg3)) {
      SWIG_fail;
    }
  }
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "make_geom_epsilon" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  {
    if(!pymaterial_to_material(obj4, &arg5)) {
      SWIG_fail;
    }
  }
  {
    Py_ssize_t len = PyList_Size(obj5);
    
    if (len == 0) {
      arg6 = material_type_list();
    } else {
      material_type_list mtl;
      mtl.num_items = len;
      mtl.items = new material_type[len];
      for (Py_ssize_t i = 0; i < len; i++) {
        PyObject *py_material = PyList_GetItem(obj5, i);
        if (!pymaterial_to_material(py_material, &mtl.items[i])) {
          SWIG_fail;
        }
      }
      arg6 = mtl;
    }
  }
  {
    try {
      result = (meep_geom::geom_epsilon *)meep_geom::make_geom_epsilon(arg1,arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  {
    gobj_list_freearg(arg2);
  }
  {
    if (arg5) {
      material_free(arg5);
    }
  }
  {
    if ((&arg6)->num_items != 0) {
      for (int i = 0; i < (&arg6)->num_items; i++) {
        material_free((&arg6)->items[i]);
      }
    }
    delete[] (&arg6)->items;
  }
  return resultobj;
fail:
  {
    gobj_list_freearg(arg2);
  }
  {
    if (arg5) {
      material_free(arg5);
    }
  }
  {
    if ((&arg6)->num_items != 0) {
      for (int i = 0; i < (&arg6)->num_items; i++) {
        material_free((&arg6)->items[i]);
      }
    }
    delete[] (&arg6)->items;
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_make_geom_epsilon__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  geometric_object_list *arg2 = (geometric_object_list *) 0 ;
  vector3 arg3 ;
  bool arg4 ;
  material_type arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  geometric_object_list temp2 ;
  bool val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  meep_geom::geom_epsilon *result = 0 ;
  
  {
    arg5 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "make_geom_epsilon", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "make_geom_epsilon" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if(!py_list_to_gobj_list(obj1, &temp2)) {
      SWIG_fail;
    }
    arg2 = &temp2;
  }
  {
    if(!pyv3_to_v3(obj2, &arg3)) {
      SWIG_fail;
    }
  }
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "make_geom_epsilon" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  {
    if(!pymaterial_to_material(obj4, &arg5)) {
      SWIG_fail;
    }
  }
  {
    try {
      result = (meep_geom::geom_epsilon *)meep_geom::make_geom_epsilon(arg1,arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  {
    gobj_list_freearg(arg2);
  }
  {
    if (arg5) {
      material_free(arg5);
    }
  }
  return resultobj;
fail:
  {
    gobj_list_freearg(arg2);
  }
  {
    if (arg5) {
      material_free(arg5);
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_make_geom_epsilon__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  geometric_object_list *arg2 = (geometric_object_list *) 0 ;
  vector3 arg3 ;
  bool arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  geometric_object_list temp2 ;
  bool val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep_geom::geom_epsilon *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "make_geom_epsilon", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "make_geom_epsilon" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if(!py_list_to_gobj_list(obj1, &temp2)) {
      SWIG_fail;
    }
    arg2 = &temp2;
  }
  {
    if(!pyv3_to_v3(obj2, &arg3)) {
      SWIG_fail;
    }
  }
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "make_geom_epsilon" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  {
    try {
      result = (meep_geom::geom_epsilon *)meep_geom::make_geom_epsilon(arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  {
    gobj_list_freearg(arg2);
  }
  return resultobj;
fail:
  {
    gobj_list_freearg(arg2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_make_geom_epsilon__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  geometric_object_list *arg2 = (geometric_object_list *) 0 ;
  vector3 arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  geometric_object_list temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep_geom::geom_epsilon *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "make_geom_epsilon", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "make_geom_epsilon" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if(!py_list_to_gobj_list(obj1, &temp2)) {
      SWIG_fail;
    }
    arg2 = &temp2;
  }
  {
    if(!pyv3_to_v3(obj2, &arg3)) {
      SWIG_fail;
    }
  }
  {
    try {
      result = (meep_geom::geom_epsilon *)meep_geom::make_geom_epsilon(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  {
    gobj_list_freearg(arg2);
  }
  return resultobj;
fail:
  {
    gobj_list_freearg(arg2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_make_geom_epsilon__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  geometric_object_list *arg2 = (geometric_object_list *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  geometric_object_list temp2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep_geom::geom_epsilon *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "make_geom_epsilon", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "make_geom_epsilon" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if(!py_list_to_gobj_list(obj1, &temp2)) {
      SWIG_fail;
    }
    arg2 = &temp2;
  }
  {
    try {
      result = (meep_geom::geom_epsilon *)meep_geom::make_geom_epsilon(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  {
    gobj_list_freearg(arg2);
  }
  return resultobj;
fail:
  {
    gobj_list_freearg(arg2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_make_geom_epsilon(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[7] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_geometric_object_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_make_geom_epsilon__SWIG_4(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_geometric_object_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PyObject_IsInstance(argv[2], py_vector3_object());
        }
        if (_v) {
          return _wrap_make_geom_epsilon__SWIG_3(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_geometric_object_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PyObject_IsInstance(argv[2], py_vector3_object());
        }
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_make_geom_epsilon__SWIG_2(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_geometric_object_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PyObject_IsInstance(argv[2], py_vector3_object());
        }
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int py_material = PyObject_IsInstance(argv[4], py_material_object());
              int user_material = PyFunction_Check(argv[4]);
              int file_material = IsPyString(argv[4]);
              int numpy_material = PyArray_Check(argv[4]);
              
              _v = py_material || user_material || file_material || numpy_material;
            }
            if (_v) {
              return _wrap_make_geom_epsilon__SWIG_1(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_geometric_object_list, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = PyObject_IsInstance(argv[2], py_vector3_object());
        }
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int py_material = PyObject_IsInstance(argv[4], py_material_object());
              int user_material = PyFunction_Check(argv[4]);
              int file_material = IsPyString(argv[4]);
              int numpy_material = PyArray_Check(argv[4]);
              
              _v = py_material || user_material || file_material || numpy_material;
            }
            if (_v) {
              {
                _v = PySequence_Check(argv[5]);
              }
              if (_v) {
                return _wrap_make_geom_epsilon__SWIG_0(self, args);
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'make_geom_epsilon'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep_geom::make_geom_epsilon(meep::structure *,geometric_object_list *,vector3,bool,material_type,material_type_list)\n"
    "    meep_geom::make_geom_epsilon(meep::structure *,geometric_object_list *,vector3,bool,material_type)\n"
    "    meep_geom::make_geom_epsilon(meep::structure *,geometric_object_list *,vector3,bool)\n"
    "    meep_geom::make_geom_epsilon(meep::structure *,geometric_object_list *,vector3)\n"
    "    meep_geom::make_geom_epsilon(meep::structure *,geometric_object_list *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_set_materials_from_geometry__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  geometric_object_list arg2 ;
  vector3 arg3 ;
  bool arg4 ;
  double arg5 ;
  int arg6 ;
  bool arg7 ;
  material_type arg8 ;
  meep_geom::absorber_list arg9 = (meep_geom::absorber_list) 0 ;
  material_type_list arg10 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  
  {
    (&arg2)->num_items = 0;
    (&arg2)->items = NULL;
  }
  {
    arg8 = NULL;
  }
  {
    arg9 = NULL;
  }
  {
    (&arg10)->num_items = 0;
    (&arg10)->items = NULL;
  }
  if (!PyArg_UnpackTuple(args, "set_materials_from_geometry", 10, 10, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "set_materials_from_geometry" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if(!py_list_to_gobj_list(obj1, &arg2)) {
      SWIG_fail;
    }
  }
  {
    if(!pyv3_to_v3(obj2, &arg3)) {
      SWIG_fail;
    }
  }
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "set_materials_from_geometry" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "set_materials_from_geometry" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "set_materials_from_geometry" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "set_materials_from_geometry" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  {
    if(!pymaterial_to_material(obj7, &arg8)) {
      SWIG_fail;
    }
  }
  {
    Py_ssize_t len = PyList_Size(obj8);
    
    if (len == 0) {
      arg9 = 0;
    } else {
      arg9 = create_absorber_list();
      
      for (Py_ssize_t i = 0; i < len; i++) {
        absorber a;
        PyObject *py_absorber = PyList_GetItem(obj8, i);
        
        if (!pyabsorber_to_absorber(py_absorber, &a)) {
          SWIG_fail;
        }
        
        add_absorbing_layer(arg9, a.thickness, a.direction, a.side,
          a.R_asymptotic, a.mean_stretch, py_pml_profile,
          a.pml_profile_data);
        Py_DECREF((PyObject *)a.pml_profile_data);
      }
    }
  }
  {
    Py_ssize_t len = PyList_Size(obj9);
    
    if (len == 0) {
      arg10 = material_type_list();
    } else {
      material_type_list mtl;
      mtl.num_items = len;
      mtl.items = new material_type[len];
      for (Py_ssize_t i = 0; i < len; i++) {
        PyObject *py_material = PyList_GetItem(obj9, i);
        if (!pymaterial_to_material(py_material, &mtl.items[i])) {
          SWIG_fail;
        }
      }
      arg10 = mtl;
    }
  }
  {
    try {
      meep_geom::set_materials_from_geometry(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    gobj_list_freearg(&arg2);
  }
  {
    if (arg8) {
      material_free(arg8);
    }
  }
  {
    destroy_absorber_list(arg9);
  }
  {
    if ((&arg10)->num_items != 0) {
      for (int i = 0; i < (&arg10)->num_items; i++) {
        material_free((&arg10)->items[i]);
      }
    }
    delete[] (&arg10)->items;
  }
  return resultobj;
fail:
  {
    gobj_list_freearg(&arg2);
  }
  {
    if (arg8) {
      material_free(arg8);
    }
  }
  {
    destroy_absorber_list(arg9);
  }
  {
    if ((&arg10)->num_items != 0) {
      for (int i = 0; i < (&arg10)->num_items; i++) {
        material_free((&arg10)->items[i]);
      }
    }
    delete[] (&arg10)->items;
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_set_materials_from_geometry__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  geometric_object_list arg2 ;
  vector3 arg3 ;
  bool arg4 ;
  double arg5 ;
  int arg6 ;
  bool arg7 ;
  material_type arg8 ;
  meep_geom::absorber_list arg9 = (meep_geom::absorber_list) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  
  {
    (&arg2)->num_items = 0;
    (&arg2)->items = NULL;
  }
  {
    arg8 = NULL;
  }
  {
    arg9 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "set_materials_from_geometry", 9, 9, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "set_materials_from_geometry" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if(!py_list_to_gobj_list(obj1, &arg2)) {
      SWIG_fail;
    }
  }
  {
    if(!pyv3_to_v3(obj2, &arg3)) {
      SWIG_fail;
    }
  }
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "set_materials_from_geometry" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "set_materials_from_geometry" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "set_materials_from_geometry" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "set_materials_from_geometry" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  {
    if(!pymaterial_to_material(obj7, &arg8)) {
      SWIG_fail;
    }
  }
  {
    Py_ssize_t len = PyList_Size(obj8);
    
    if (len == 0) {
      arg9 = 0;
    } else {
      arg9 = create_absorber_list();
      
      for (Py_ssize_t i = 0; i < len; i++) {
        absorber a;
        PyObject *py_absorber = PyList_GetItem(obj8, i);
        
        if (!pyabsorber_to_absorber(py_absorber, &a)) {
          SWIG_fail;
        }
        
        add_absorbing_layer(arg9, a.thickness, a.direction, a.side,
          a.R_asymptotic, a.mean_stretch, py_pml_profile,
          a.pml_profile_data);
        Py_DECREF((PyObject *)a.pml_profile_data);
      }
    }
  }
  {
    try {
      meep_geom::set_materials_from_geometry(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    gobj_list_freearg(&arg2);
  }
  {
    if (arg8) {
      material_free(arg8);
    }
  }
  {
    destroy_absorber_list(arg9);
  }
  return resultobj;
fail:
  {
    gobj_list_freearg(&arg2);
  }
  {
    if (arg8) {
      material_free(arg8);
    }
  }
  {
    destroy_absorber_list(arg9);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_set_materials_from_geometry__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  geometric_object_list arg2 ;
  vector3 arg3 ;
  bool arg4 ;
  double arg5 ;
  int arg6 ;
  bool arg7 ;
  material_type arg8 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  
  {
    (&arg2)->num_items = 0;
    (&arg2)->items = NULL;
  }
  {
    arg8 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "set_materials_from_geometry", 8, 8, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "set_materials_from_geometry" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if(!py_list_to_gobj_list(obj1, &arg2)) {
      SWIG_fail;
    }
  }
  {
    if(!pyv3_to_v3(obj2, &arg3)) {
      SWIG_fail;
    }
  }
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "set_materials_from_geometry" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "set_materials_from_geometry" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "set_materials_from_geometry" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "set_materials_from_geometry" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  {
    if(!pymaterial_to_material(obj7, &arg8)) {
      SWIG_fail;
    }
  }
  {
    try {
      meep_geom::set_materials_from_geometry(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    gobj_list_freearg(&arg2);
  }
  {
    if (arg8) {
      material_free(arg8);
    }
  }
  return resultobj;
fail:
  {
    gobj_list_freearg(&arg2);
  }
  {
    if (arg8) {
      material_free(arg8);
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_set_materials_from_geometry__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  geometric_object_list arg2 ;
  vector3 arg3 ;
  bool arg4 ;
  double arg5 ;
  int arg6 ;
  bool arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  
  {
    (&arg2)->num_items = 0;
    (&arg2)->items = NULL;
  }
  if (!PyArg_UnpackTuple(args, "set_materials_from_geometry", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "set_materials_from_geometry" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if(!py_list_to_gobj_list(obj1, &arg2)) {
      SWIG_fail;
    }
  }
  {
    if(!pyv3_to_v3(obj2, &arg3)) {
      SWIG_fail;
    }
  }
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "set_materials_from_geometry" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "set_materials_from_geometry" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "set_materials_from_geometry" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_bool(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "set_materials_from_geometry" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  {
    try {
      meep_geom::set_materials_from_geometry(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    gobj_list_freearg(&arg2);
  }
  return resultobj;
fail:
  {
    gobj_list_freearg(&arg2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_set_materials_from_geometry__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  geometric_object_list arg2 ;
  vector3 arg3 ;
  bool arg4 ;
  double arg5 ;
  int arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  {
    (&arg2)->num_items = 0;
    (&arg2)->items = NULL;
  }
  if (!PyArg_UnpackTuple(args, "set_materials_from_geometry", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "set_materials_from_geometry" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if(!py_list_to_gobj_list(obj1, &arg2)) {
      SWIG_fail;
    }
  }
  {
    if(!pyv3_to_v3(obj2, &arg3)) {
      SWIG_fail;
    }
  }
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "set_materials_from_geometry" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "set_materials_from_geometry" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "set_materials_from_geometry" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  {
    try {
      meep_geom::set_materials_from_geometry(arg1,arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    gobj_list_freearg(&arg2);
  }
  return resultobj;
fail:
  {
    gobj_list_freearg(&arg2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_set_materials_from_geometry__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  geometric_object_list arg2 ;
  vector3 arg3 ;
  bool arg4 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  {
    (&arg2)->num_items = 0;
    (&arg2)->items = NULL;
  }
  if (!PyArg_UnpackTuple(args, "set_materials_from_geometry", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "set_materials_from_geometry" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if(!py_list_to_gobj_list(obj1, &arg2)) {
      SWIG_fail;
    }
  }
  {
    if(!pyv3_to_v3(obj2, &arg3)) {
      SWIG_fail;
    }
  }
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "set_materials_from_geometry" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "set_materials_from_geometry" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      meep_geom::set_materials_from_geometry(arg1,arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    gobj_list_freearg(&arg2);
  }
  return resultobj;
fail:
  {
    gobj_list_freearg(&arg2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_set_materials_from_geometry__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  geometric_object_list arg2 ;
  vector3 arg3 ;
  bool arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  {
    (&arg2)->num_items = 0;
    (&arg2)->items = NULL;
  }
  if (!PyArg_UnpackTuple(args, "set_materials_from_geometry", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "set_materials_from_geometry" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if(!py_list_to_gobj_list(obj1, &arg2)) {
      SWIG_fail;
    }
  }
  {
    if(!pyv3_to_v3(obj2, &arg3)) {
      SWIG_fail;
    }
  }
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "set_materials_from_geometry" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  {
    try {
      meep_geom::set_materials_from_geometry(arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    gobj_list_freearg(&arg2);
  }
  return resultobj;
fail:
  {
    gobj_list_freearg(&arg2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_set_materials_from_geometry__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  geometric_object_list arg2 ;
  vector3 arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  {
    (&arg2)->num_items = 0;
    (&arg2)->items = NULL;
  }
  if (!PyArg_UnpackTuple(args, "set_materials_from_geometry", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "set_materials_from_geometry" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if(!py_list_to_gobj_list(obj1, &arg2)) {
      SWIG_fail;
    }
  }
  {
    if(!pyv3_to_v3(obj2, &arg3)) {
      SWIG_fail;
    }
  }
  {
    try {
      meep_geom::set_materials_from_geometry(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    gobj_list_freearg(&arg2);
  }
  return resultobj;
fail:
  {
    gobj_list_freearg(&arg2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_set_materials_from_geometry__SWIG_8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  geometric_object_list arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    (&arg2)->num_items = 0;
    (&arg2)->items = NULL;
  }
  if (!PyArg_UnpackTuple(args, "set_materials_from_geometry", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "set_materials_from_geometry" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if(!py_list_to_gobj_list(obj1, &arg2)) {
      SWIG_fail;
    }
  }
  {
    try {
      meep_geom::set_materials_from_geometry(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    gobj_list_freearg(&arg2);
  }
  return resultobj;
fail:
  {
    gobj_list_freearg(&arg2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_set_materials_from_geometry(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[11] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 10) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyList_Check(argv[1]);
      }
      if (_v) {
        return _wrap_set_materials_from_geometry__SWIG_8(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyList_Check(argv[1]);
      }
      if (_v) {
        {
          _v = PyObject_IsInstance(argv[2], py_vector3_object());
        }
        if (_v) {
          return _wrap_set_materials_from_geometry__SWIG_7(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyList_Check(argv[1]);
      }
      if (_v) {
        {
          _v = PyObject_IsInstance(argv[2], py_vector3_object());
        }
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_set_materials_from_geometry__SWIG_6(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyList_Check(argv[1]);
      }
      if (_v) {
        {
          _v = PyObject_IsInstance(argv[2], py_vector3_object());
        }
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_set_materials_from_geometry__SWIG_5(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyList_Check(argv[1]);
      }
      if (_v) {
        {
          _v = PyObject_IsInstance(argv[2], py_vector3_object());
        }
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_set_materials_from_geometry__SWIG_4(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyList_Check(argv[1]);
      }
      if (_v) {
        {
          _v = PyObject_IsInstance(argv[2], py_vector3_object());
        }
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  return _wrap_set_materials_from_geometry__SWIG_3(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 8) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyList_Check(argv[1]);
      }
      if (_v) {
        {
          _v = PyObject_IsInstance(argv[2], py_vector3_object());
        }
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int py_material = PyObject_IsInstance(argv[7], py_material_object());
                    int user_material = PyFunction_Check(argv[7]);
                    int file_material = IsPyString(argv[7]);
                    int numpy_material = PyArray_Check(argv[7]);
                    
                    _v = py_material || user_material || file_material || numpy_material;
                  }
                  if (_v) {
                    return _wrap_set_materials_from_geometry__SWIG_2(self, args);
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 9) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyList_Check(argv[1]);
      }
      if (_v) {
        {
          _v = PyObject_IsInstance(argv[2], py_vector3_object());
        }
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int py_material = PyObject_IsInstance(argv[7], py_material_object());
                    int user_material = PyFunction_Check(argv[7]);
                    int file_material = IsPyString(argv[7]);
                    int numpy_material = PyArray_Check(argv[7]);
                    
                    _v = py_material || user_material || file_material || numpy_material;
                  }
                  if (_v) {
                    {
                      _v = PySequence_Check(argv[8]);
                    }
                    if (_v) {
                      return _wrap_set_materials_from_geometry__SWIG_1(self, args);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 10) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__structure, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PyList_Check(argv[1]);
      }
      if (_v) {
        {
          _v = PyObject_IsInstance(argv[2], py_vector3_object());
        }
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_bool(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int py_material = PyObject_IsInstance(argv[7], py_material_object());
                    int user_material = PyFunction_Check(argv[7]);
                    int file_material = IsPyString(argv[7]);
                    int numpy_material = PyArray_Check(argv[7]);
                    
                    _v = py_material || user_material || file_material || numpy_material;
                  }
                  if (_v) {
                    {
                      _v = PySequence_Check(argv[8]);
                    }
                    if (_v) {
                      {
                        _v = PySequence_Check(argv[9]);
                      }
                      if (_v) {
                        return _wrap_set_materials_from_geometry__SWIG_0(self, args);
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'set_materials_from_geometry'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep_geom::set_materials_from_geometry(meep::structure *,geometric_object_list,vector3,bool,double,int,bool,material_type,meep_geom::absorber_list,material_type_list)\n"
    "    meep_geom::set_materials_from_geometry(meep::structure *,geometric_object_list,vector3,bool,double,int,bool,material_type,meep_geom::absorber_list)\n"
    "    meep_geom::set_materials_from_geometry(meep::structure *,geometric_object_list,vector3,bool,double,int,bool,material_type)\n"
    "    meep_geom::set_materials_from_geometry(meep::structure *,geometric_object_list,vector3,bool,double,int,bool)\n"
    "    meep_geom::set_materials_from_geometry(meep::structure *,geometric_object_list,vector3,bool,double,int)\n"
    "    meep_geom::set_materials_from_geometry(meep::structure *,geometric_object_list,vector3,bool,double)\n"
    "    meep_geom::set_materials_from_geometry(meep::structure *,geometric_object_list,vector3,bool)\n"
    "    meep_geom::set_materials_from_geometry(meep::structure *,geometric_object_list,vector3)\n"
    "    meep_geom::set_materials_from_geometry(meep::structure *,geometric_object_list)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_make_dielectric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  material_type result;
  
  if (!PyArg_UnpackTuple(args, "make_dielectric", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "make_dielectric" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  {
    try {
      result = meep_geom::make_dielectric(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new material_type(static_cast< const material_type& >(result))), SWIGTYPE_p_material_type, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_make_user_material(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  user_material_func arg1 ;
  void *arg2 = (void *) 0 ;
  bool arg3 ;
  void *argp1 ;
  int res1 = 0 ;
  int res2 ;
  bool val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  material_type result;
  
  if (!PyArg_UnpackTuple(args, "make_user_material", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  {
    res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_user_material_func,  0  | 0);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "make_user_material" "', argument " "1"" of type '" "user_material_func""'"); 
    }  
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "make_user_material" "', argument " "1"" of type '" "user_material_func""'");
    } else {
      user_material_func * temp = reinterpret_cast< user_material_func * >(argp1);
      arg1 = *temp;
      if (SWIG_IsNewObj(res1)) delete temp;
    }
  }
  res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "make_user_material" "', argument " "2"" of type '" "void *""'"); 
  }
  ecode3 = SWIG_AsVal_bool(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "make_user_material" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      result = meep_geom::make_user_material(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new material_type(static_cast< const material_type& >(result))), SWIGTYPE_p_material_type, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_make_file_material(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject * obj0 = 0 ;
  material_type result;
  
  if (!PyArg_UnpackTuple(args, "make_file_material", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "make_file_material" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    try {
      result = meep_geom::make_file_material((char const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new material_type(static_cast< const material_type& >(result))), SWIGTYPE_p_material_type, SWIG_POINTER_OWN |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_make_material_grid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  bool arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  bool val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  material_type result;
  
  if (!PyArg_UnpackTuple(args, "make_material_grid", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  ecode1 = SWIG_AsVal_bool(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "make_material_grid" "', argument " "1"" of type '" "bool""'");
  } 
  arg1 = static_cast< bool >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "make_material_grid" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "make_material_grid" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "make_material_grid" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  {
    try {
      result = meep_geom::make_material_grid(arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new material_type(static_cast< const material_type& >(result))), SWIGTYPE_p_material_type, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vec_to_vector3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::vec *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  vector3 result;
  
  if (!PyArg_UnpackTuple(args, "vec_to_vector3", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vec_to_vector3" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "vec_to_vector3" "', argument " "1"" of type '" "meep::vec const &""'"); 
  }
  arg1 = reinterpret_cast< meep::vec * >(argp1);
  {
    try {
      result = meep_geom::vec_to_vector3((meep::vec const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new vector3(static_cast< const vector3& >(result))), SWIGTYPE_p_vector3, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vector3_to_vec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  vector3 arg1 ;
  PyObject * obj0 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "vector3_to_vec", 1, 1, &obj0)) SWIG_fail;
  {
    if(!pyv3_to_v3(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  {
    try {
      result = meep_geom::vector3_to_vec(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_set_default_material(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  material_type arg1 ;
  PyObject * obj0 = 0 ;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "set_default_material", 1, 1, &obj0)) SWIG_fail;
  {
    if(!pymaterial_to_material(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  {
    try {
      meep_geom::set_default_material(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  return resultobj;
fail:
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_unset_default_material(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  
  if (!PyArg_UnpackTuple(args, "unset_default_material", 0, 0)) SWIG_fail;
  {
    try {
      meep_geom::unset_default_material();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_epsilon_material_grid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  material_data *arg1 = (material_data *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "epsilon_material_grid", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_material_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "epsilon_material_grid" "', argument " "1"" of type '" "material_data *""'"); 
  }
  arg1 = reinterpret_cast< material_data * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "epsilon_material_grid" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      meep_geom::epsilon_material_grid(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_epsilon_file_material(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  material_data *arg1 = (material_data *) 0 ;
  vector3 arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "epsilon_file_material", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_material_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "epsilon_file_material" "', argument " "1"" of type '" "material_data *""'"); 
  }
  arg1 = reinterpret_cast< material_data * >(argp1);
  {
    if(!pyv3_to_v3(obj1, &arg2)) {
      SWIG_fail;
    }
  }
  {
    try {
      meep_geom::epsilon_file_material(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_material_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  material_type arg1 ;
  PyObject * obj0 = 0 ;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "material_free", 1, 1, &obj0)) SWIG_fail;
  {
    if(!pymaterial_to_material(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  {
    try {
      meep_geom::material_free(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  return resultobj;
fail:
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_is_material_grid__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  material_type arg1 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "is_material_grid", 1, 1, &obj0)) SWIG_fail;
  {
    if(!pymaterial_to_material(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  {
    try {
      result = (bool)meep_geom::is_material_grid(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  return resultobj;
fail:
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_is_material_grid__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  void *arg1 = (void *) 0 ;
  int res1 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "is_material_grid", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "is_material_grid" "', argument " "1"" of type '" "void *""'"); 
  }
  {
    try {
      result = (bool)meep_geom::is_material_grid(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_is_material_grid(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[2] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 1) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    {
      int py_material = PyObject_IsInstance(argv[0], py_material_object());
      int user_material = PyFunction_Check(argv[0]);
      int file_material = IsPyString(argv[0]);
      int numpy_material = PyArray_Check(argv[0]);
      
      _v = py_material || user_material || file_material || numpy_material;
    }
    if (_v) {
      return _wrap_is_material_grid__SWIG_0(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    void *ptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &ptr, 0, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_is_material_grid__SWIG_1(self, args);
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'is_material_grid'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep_geom::is_material_grid(material_type)\n"
    "    meep_geom::is_material_grid(void *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_gv2box(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  geom_box result;
  
  if (!PyArg_UnpackTuple(args, "gv2box", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gv2box" "', argument " "1"" of type '" "meep::volume const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "gv2box" "', argument " "1"" of type '" "meep::volume const &""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  {
    try {
      result = meep_geom::gv2box((meep::volume const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new geom_box(static_cast< const geom_box& >(result))), SWIGTYPE_p_geom_box, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_epsilon_grid__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  geometric_object_list arg1 ;
  material_type_list arg2 ;
  material_type arg3 ;
  bool arg4 ;
  meep::grid_volume arg5 ;
  vector3 arg6 ;
  vector3 arg7 ;
  int arg8 ;
  double *arg9 = (double *) 0 ;
  int arg10 ;
  double *arg11 = (double *) 0 ;
  int arg12 ;
  double *arg13 = (double *) 0 ;
  std::complex< double > *arg14 = (std::complex< double > *) 0 ;
  double arg15 ;
  bool val4 ;
  int ecode4 = 0 ;
  void *argp5 ;
  int res5 = 0 ;
  int val8 ;
  int ecode8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  int val10 ;
  int ecode10 = 0 ;
  void *argp11 = 0 ;
  int res11 = 0 ;
  int val12 ;
  int ecode12 = 0 ;
  void *argp13 = 0 ;
  int res13 = 0 ;
  double val15 ;
  int ecode15 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  PyObject * obj14 = 0 ;
  
  {
    (&arg1)->num_items = 0;
    (&arg1)->items = NULL;
  }
  {
    (&arg2)->num_items = 0;
    (&arg2)->items = NULL;
  }
  {
    arg3 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "get_epsilon_grid", 15, 15, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13, &obj14)) SWIG_fail;
  {
    if(!py_list_to_gobj_list(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  {
    Py_ssize_t len = PyList_Size(obj1);
    
    if (len == 0) {
      arg2 = material_type_list();
    } else {
      material_type_list mtl;
      mtl.num_items = len;
      mtl.items = new material_type[len];
      for (Py_ssize_t i = 0; i < len; i++) {
        PyObject *py_material = PyList_GetItem(obj1, i);
        if (!pymaterial_to_material(py_material, &mtl.items[i])) {
          SWIG_fail;
        }
      }
      arg2 = mtl;
    }
  }
  {
    if(!pymaterial_to_material(obj2, &arg3)) {
      SWIG_fail;
    }
  }
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "get_epsilon_grid" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  {
    res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__grid_volume,  0  | 0);
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "get_epsilon_grid" "', argument " "5"" of type '" "meep::grid_volume""'"); 
    }  
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "get_epsilon_grid" "', argument " "5"" of type '" "meep::grid_volume""'");
    } else {
      meep::grid_volume * temp = reinterpret_cast< meep::grid_volume * >(argp5);
      arg5 = *temp;
      if (SWIG_IsNewObj(res5)) delete temp;
    }
  }
  {
    if(!pyv3_to_v3(obj5, &arg6)) {
      SWIG_fail;
    }
  }
  {
    if(!pyv3_to_v3(obj6, &arg7)) {
      SWIG_fail;
    }
  }
  ecode8 = SWIG_AsVal_int(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "get_epsilon_grid" "', argument " "8"" of type '" "int""'");
  } 
  arg8 = static_cast< int >(val8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "get_epsilon_grid" "', argument " "9"" of type '" "double const *""'"); 
  }
  arg9 = reinterpret_cast< double * >(argp9);
  ecode10 = SWIG_AsVal_int(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "get_epsilon_grid" "', argument " "10"" of type '" "int""'");
  } 
  arg10 = static_cast< int >(val10);
  res11 = SWIG_ConvertPtr(obj10, &argp11,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res11)) {
    SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "get_epsilon_grid" "', argument " "11"" of type '" "double const *""'"); 
  }
  arg11 = reinterpret_cast< double * >(argp11);
  ecode12 = SWIG_AsVal_int(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "get_epsilon_grid" "', argument " "12"" of type '" "int""'");
  } 
  arg12 = static_cast< int >(val12);
  res13 = SWIG_ConvertPtr(obj12, &argp13,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res13)) {
    SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "get_epsilon_grid" "', argument " "13"" of type '" "double const *""'"); 
  }
  arg13 = reinterpret_cast< double * >(argp13);
  {
    arg14 = (std::complex<double> *)array_data(obj13);
  }
  ecode15 = SWIG_AsVal_double(obj14, &val15);
  if (!SWIG_IsOK(ecode15)) {
    SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "get_epsilon_grid" "', argument " "15"" of type '" "double""'");
  } 
  arg15 = static_cast< double >(val15);
  {
    try {
      meep_geom::get_epsilon_grid(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,(double const *)arg9,arg10,(double const *)arg11,arg12,(double const *)arg13,arg14,arg15);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    gobj_list_freearg(&arg1);
  }
  {
    if ((&arg2)->num_items != 0) {
      for (int i = 0; i < (&arg2)->num_items; i++) {
        material_free((&arg2)->items[i]);
      }
    }
    delete[] (&arg2)->items;
  }
  {
    if (arg3) {
      material_free(arg3);
    }
  }
  return resultobj;
fail:
  {
    gobj_list_freearg(&arg1);
  }
  {
    if ((&arg2)->num_items != 0) {
      for (int i = 0; i < (&arg2)->num_items; i++) {
        material_free((&arg2)->items[i]);
      }
    }
    delete[] (&arg2)->items;
  }
  {
    if (arg3) {
      material_free(arg3);
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_epsilon_grid__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  geometric_object_list arg1 ;
  material_type_list arg2 ;
  material_type arg3 ;
  bool arg4 ;
  meep::grid_volume arg5 ;
  vector3 arg6 ;
  vector3 arg7 ;
  int arg8 ;
  double *arg9 = (double *) 0 ;
  int arg10 ;
  double *arg11 = (double *) 0 ;
  int arg12 ;
  double *arg13 = (double *) 0 ;
  std::complex< double > *arg14 = (std::complex< double > *) 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  void *argp5 ;
  int res5 = 0 ;
  int val8 ;
  int ecode8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  int val10 ;
  int ecode10 = 0 ;
  void *argp11 = 0 ;
  int res11 = 0 ;
  int val12 ;
  int ecode12 = 0 ;
  void *argp13 = 0 ;
  int res13 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  
  {
    (&arg1)->num_items = 0;
    (&arg1)->items = NULL;
  }
  {
    (&arg2)->num_items = 0;
    (&arg2)->items = NULL;
  }
  {
    arg3 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "get_epsilon_grid", 14, 14, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13)) SWIG_fail;
  {
    if(!py_list_to_gobj_list(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  {
    Py_ssize_t len = PyList_Size(obj1);
    
    if (len == 0) {
      arg2 = material_type_list();
    } else {
      material_type_list mtl;
      mtl.num_items = len;
      mtl.items = new material_type[len];
      for (Py_ssize_t i = 0; i < len; i++) {
        PyObject *py_material = PyList_GetItem(obj1, i);
        if (!pymaterial_to_material(py_material, &mtl.items[i])) {
          SWIG_fail;
        }
      }
      arg2 = mtl;
    }
  }
  {
    if(!pymaterial_to_material(obj2, &arg3)) {
      SWIG_fail;
    }
  }
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "get_epsilon_grid" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  {
    res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__grid_volume,  0  | 0);
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "get_epsilon_grid" "', argument " "5"" of type '" "meep::grid_volume""'"); 
    }  
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "get_epsilon_grid" "', argument " "5"" of type '" "meep::grid_volume""'");
    } else {
      meep::grid_volume * temp = reinterpret_cast< meep::grid_volume * >(argp5);
      arg5 = *temp;
      if (SWIG_IsNewObj(res5)) delete temp;
    }
  }
  {
    if(!pyv3_to_v3(obj5, &arg6)) {
      SWIG_fail;
    }
  }
  {
    if(!pyv3_to_v3(obj6, &arg7)) {
      SWIG_fail;
    }
  }
  ecode8 = SWIG_AsVal_int(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "get_epsilon_grid" "', argument " "8"" of type '" "int""'");
  } 
  arg8 = static_cast< int >(val8);
  res9 = SWIG_ConvertPtr(obj8, &argp9,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "get_epsilon_grid" "', argument " "9"" of type '" "double const *""'"); 
  }
  arg9 = reinterpret_cast< double * >(argp9);
  ecode10 = SWIG_AsVal_int(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "get_epsilon_grid" "', argument " "10"" of type '" "int""'");
  } 
  arg10 = static_cast< int >(val10);
  res11 = SWIG_ConvertPtr(obj10, &argp11,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res11)) {
    SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "get_epsilon_grid" "', argument " "11"" of type '" "double const *""'"); 
  }
  arg11 = reinterpret_cast< double * >(argp11);
  ecode12 = SWIG_AsVal_int(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "get_epsilon_grid" "', argument " "12"" of type '" "int""'");
  } 
  arg12 = static_cast< int >(val12);
  res13 = SWIG_ConvertPtr(obj12, &argp13,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res13)) {
    SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "get_epsilon_grid" "', argument " "13"" of type '" "double const *""'"); 
  }
  arg13 = reinterpret_cast< double * >(argp13);
  {
    arg14 = (std::complex<double> *)array_data(obj13);
  }
  {
    try {
      meep_geom::get_epsilon_grid(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,(double const *)arg9,arg10,(double const *)arg11,arg12,(double const *)arg13,arg14);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    gobj_list_freearg(&arg1);
  }
  {
    if ((&arg2)->num_items != 0) {
      for (int i = 0; i < (&arg2)->num_items; i++) {
        material_free((&arg2)->items[i]);
      }
    }
    delete[] (&arg2)->items;
  }
  {
    if (arg3) {
      material_free(arg3);
    }
  }
  return resultobj;
fail:
  {
    gobj_list_freearg(&arg1);
  }
  {
    if ((&arg2)->num_items != 0) {
      for (int i = 0; i < (&arg2)->num_items; i++) {
        material_free((&arg2)->items[i]);
      }
    }
    delete[] (&arg2)->items;
  }
  {
    if (arg3) {
      material_free(arg3);
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_epsilon_grid(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[16] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 15) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 14) {
    int _v;
    {
      _v = PyList_Check(argv[0]);
    }
    if (_v) {
      {
        _v = PySequence_Check(argv[1]);
      }
      if (_v) {
        {
          int py_material = PyObject_IsInstance(argv[2], py_material_object());
          int user_material = PyFunction_Check(argv[2]);
          int file_material = IsPyString(argv[2]);
          int numpy_material = PyArray_Check(argv[2]);
          
          _v = py_material || user_material || file_material || numpy_material;
        }
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            int res = SWIG_ConvertPtr(argv[4], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                _v = PyObject_IsInstance(argv[5], py_vector3_object());
              }
              if (_v) {
                {
                  _v = PyObject_IsInstance(argv[6], py_vector3_object());
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_int(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_double, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      {
                        int res = SWIG_AsVal_int(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        void *vptr = 0;
                        int res = SWIG_ConvertPtr(argv[10], &vptr, SWIGTYPE_p_double, 0);
                        _v = SWIG_CheckState(res);
                        if (_v) {
                          {
                            int res = SWIG_AsVal_int(argv[11], NULL);
                            _v = SWIG_CheckState(res);
                          }
                          if (_v) {
                            void *vptr = 0;
                            int res = SWIG_ConvertPtr(argv[12], &vptr, SWIGTYPE_p_double, 0);
                            _v = SWIG_CheckState(res);
                            if (_v) {
                              {
                                _v = is_array(argv[13]);
                              }
                              if (_v) {
                                return _wrap_get_epsilon_grid__SWIG_1(self, args);
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 15) {
    int _v;
    {
      _v = PyList_Check(argv[0]);
    }
    if (_v) {
      {
        _v = PySequence_Check(argv[1]);
      }
      if (_v) {
        {
          int py_material = PyObject_IsInstance(argv[2], py_material_object());
          int user_material = PyFunction_Check(argv[2]);
          int file_material = IsPyString(argv[2]);
          int numpy_material = PyArray_Check(argv[2]);
          
          _v = py_material || user_material || file_material || numpy_material;
        }
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            int res = SWIG_ConvertPtr(argv[4], 0, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL | 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              {
                _v = PyObject_IsInstance(argv[5], py_vector3_object());
              }
              if (_v) {
                {
                  _v = PyObject_IsInstance(argv[6], py_vector3_object());
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_int(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_double, 0);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      {
                        int res = SWIG_AsVal_int(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        void *vptr = 0;
                        int res = SWIG_ConvertPtr(argv[10], &vptr, SWIGTYPE_p_double, 0);
                        _v = SWIG_CheckState(res);
                        if (_v) {
                          {
                            int res = SWIG_AsVal_int(argv[11], NULL);
                            _v = SWIG_CheckState(res);
                          }
                          if (_v) {
                            void *vptr = 0;
                            int res = SWIG_ConvertPtr(argv[12], &vptr, SWIGTYPE_p_double, 0);
                            _v = SWIG_CheckState(res);
                            if (_v) {
                              {
                                _v = is_array(argv[13]);
                              }
                              if (_v) {
                                {
                                  int res = SWIG_AsVal_double(argv[14], NULL);
                                  _v = SWIG_CheckState(res);
                                }
                                if (_v) {
                                  return _wrap_get_epsilon_grid__SWIG_0(self, args);
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'get_epsilon_grid'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep_geom::get_epsilon_grid(geometric_object_list,material_type_list,material_type,bool,meep::grid_volume,vector3,vector3,int,double const *,int,double const *,int,double const *,std::complex< double > *,double)\n"
    "    meep_geom::get_epsilon_grid(geometric_object_list,material_type_list,material_type,bool,meep::grid_volume,vector3,vector3,int,double const *,int,double const *,int,double const *,std::complex< double > *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_init_libctl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  material_type arg1 ;
  bool arg2 ;
  meep::grid_volume *arg3 = (meep::grid_volume *) 0 ;
  vector3 arg4 ;
  vector3 arg5 ;
  geometric_object_list *arg6 = (geometric_object_list *) 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  geometric_object_list temp6 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "init_libctl", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  {
    if(!pymaterial_to_material(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  ecode2 = SWIG_AsVal_bool(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "init_libctl" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_meep__grid_volume, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "init_libctl" "', argument " "3"" of type '" "meep::grid_volume *""'"); 
  }
  arg3 = reinterpret_cast< meep::grid_volume * >(argp3);
  {
    if(!pyv3_to_v3(obj3, &arg4)) {
      SWIG_fail;
    }
  }
  {
    if(!pyv3_to_v3(obj4, &arg5)) {
      SWIG_fail;
    }
  }
  {
    if(!py_list_to_gobj_list(obj5, &temp6)) {
      SWIG_fail;
    }
    arg6 = &temp6;
  }
  {
    try {
      meep_geom::init_libctl(arg1,arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  {
    gobj_list_freearg(arg6);
  }
  return resultobj;
fail:
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  {
    gobj_list_freearg(arg6);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_update_weights(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  material_type arg1 ;
  double *arg2 = (double *) 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "update_weights", 2, 2, &obj0, &obj1)) SWIG_fail;
  {
    if(!pymaterial_to_material(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  {
    arg2 = (double *)array_data(obj1);
  }
  {
    try {
      meep_geom::update_weights(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  return resultobj;
fail:
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_matgrid_grad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  vector3 arg1 ;
  geom_box_tree arg2 ;
  int arg3 ;
  material_data *arg4 = (material_data *) 0 ;
  void *argp2 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "matgrid_grad", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  {
    if(!pyv3_to_v3(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_geom_box_tree,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "matgrid_grad" "', argument " "2"" of type '" "geom_box_tree""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "matgrid_grad" "', argument " "2"" of type '" "geom_box_tree""'");
    } else {
      geom_box_tree * temp = reinterpret_cast< geom_box_tree * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "matgrid_grad" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_material_data, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "matgrid_grad" "', argument " "4"" of type '" "material_data *""'"); 
  }
  arg4 = reinterpret_cast< material_data * >(argp4);
  {
    try {
      result = meep_geom::matgrid_grad(arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_material_grid_grad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  vector3 arg1 ;
  material_data *arg2 = (material_data *) 0 ;
  geometric_object *arg3 = (geometric_object *) 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::vec result;
  
  if (!PyArg_UnpackTuple(args, "material_grid_grad", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  {
    if(!pyv3_to_v3(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_material_data, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "material_grid_grad" "', argument " "2"" of type '" "material_data *""'"); 
  }
  arg2 = reinterpret_cast< material_data * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_geometric_object, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "material_grid_grad" "', argument " "3"" of type '" "geometric_object const *""'"); 
  }
  arg3 = reinterpret_cast< geometric_object * >(argp3);
  {
    try {
      result = meep_geom::material_grid_grad(arg1,arg2,(geometric_object const *)arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::vec(static_cast< const meep::vec& >(result))), SWIGTYPE_p_meep__vec, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_matgrid_val(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  vector3 arg1 ;
  geom_box_tree arg2 ;
  int arg3 ;
  material_data *arg4 = (material_data *) 0 ;
  void *argp2 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "matgrid_val", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  {
    if(!pyv3_to_v3(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_geom_box_tree,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "matgrid_val" "', argument " "2"" of type '" "geom_box_tree""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "matgrid_val" "', argument " "2"" of type '" "geom_box_tree""'");
    } else {
      geom_box_tree * temp = reinterpret_cast< geom_box_tree * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "matgrid_val" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_material_data, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "matgrid_val" "', argument " "4"" of type '" "material_data *""'"); 
  }
  arg4 = reinterpret_cast< material_data * >(argp4);
  {
    try {
      result = (double)meep_geom::matgrid_val(arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_material_grid_val(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  vector3 arg1 ;
  material_data *arg2 = (material_data *) 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "material_grid_val", 2, 2, &obj0, &obj1)) SWIG_fail;
  {
    if(!pyv3_to_v3(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_material_data, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "material_grid_val" "', argument " "2"" of type '" "material_data *""'"); 
  }
  arg2 = reinterpret_cast< material_data * >(argp2);
  {
    try {
      result = (double)meep_geom::material_grid_val(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_calculate_tree(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::volume *arg1 = 0 ;
  geometric_object_list arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  geom_box_tree result;
  
  {
    (&arg2)->num_items = 0;
    (&arg2)->items = NULL;
  }
  if (!PyArg_UnpackTuple(args, "calculate_tree", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "calculate_tree" "', argument " "1"" of type '" "meep::volume const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "calculate_tree" "', argument " "1"" of type '" "meep::volume const &""'"); 
  }
  arg1 = reinterpret_cast< meep::volume * >(argp1);
  {
    if(!py_list_to_gobj_list(obj1, &arg2)) {
      SWIG_fail;
    }
  }
  {
    try {
      result = meep_geom::calculate_tree((meep::volume const &)*arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new geom_box_tree(static_cast< const geom_box_tree& >(result))), SWIGTYPE_p_geom_box_tree, SWIG_POINTER_OWN |  0 );
  {
    gobj_list_freearg(&arg2);
  }
  return resultobj;
fail:
  {
    gobj_list_freearg(&arg2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_material_grids_addgradient__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  size_t arg2 ;
  size_t arg3 ;
  SwigValueWrapper< std::vector< meep::dft_fields *,std::allocator< meep::dft_fields * > > > arg4 ;
  SwigValueWrapper< std::vector< meep::dft_fields *,std::allocator< meep::dft_fields * > > > arg5 ;
  double *arg6 = (double *) 0 ;
  double arg7 ;
  meep::grid_volume *arg8 = 0 ;
  meep::volume *arg9 = 0 ;
  meep_geom::geom_epsilon *arg10 = (meep_geom::geom_epsilon *) 0 ;
  double arg11 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  size_t val3 ;
  int ecode3 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  void *argp5 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  double val11 ;
  int ecode11 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "material_grids_addgradient", 11, 11, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "material_grids_addgradient" "', argument " "1"" of type '" "double *""'"); 
  }
  arg1 = reinterpret_cast< double * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "material_grids_addgradient" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "material_grids_addgradient" "', argument " "3"" of type '" "size_t""'");
  } 
  arg3 = static_cast< size_t >(val3);
  {
    res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_std__vectorT_meep__dft_fields_p_std__allocatorT_meep__dft_fields_p_t_t,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "material_grids_addgradient" "', argument " "4"" of type '" "std::vector< meep::dft_fields *,std::allocator< meep::dft_fields * > >""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "material_grids_addgradient" "', argument " "4"" of type '" "std::vector< meep::dft_fields *,std::allocator< meep::dft_fields * > >""'");
    } else {
      std::vector< meep::dft_fields *,std::allocator< meep::dft_fields * > > * temp = reinterpret_cast< std::vector< meep::dft_fields *,std::allocator< meep::dft_fields * > > * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  {
    res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_std__vectorT_meep__dft_fields_p_std__allocatorT_meep__dft_fields_p_t_t,  0  | 0);
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "material_grids_addgradient" "', argument " "5"" of type '" "std::vector< meep::dft_fields *,std::allocator< meep::dft_fields * > >""'"); 
    }  
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "material_grids_addgradient" "', argument " "5"" of type '" "std::vector< meep::dft_fields *,std::allocator< meep::dft_fields * > >""'");
    } else {
      std::vector< meep::dft_fields *,std::allocator< meep::dft_fields * > > * temp = reinterpret_cast< std::vector< meep::dft_fields *,std::allocator< meep::dft_fields * > > * >(argp5);
      arg5 = *temp;
      if (SWIG_IsNewObj(res5)) delete temp;
    }
  }
  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "material_grids_addgradient" "', argument " "6"" of type '" "double *""'"); 
  }
  arg6 = reinterpret_cast< double * >(argp6);
  ecode7 = SWIG_AsVal_double(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "material_grids_addgradient" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  res8 = SWIG_ConvertPtr(obj7, &argp8, SWIGTYPE_p_meep__grid_volume,  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "material_grids_addgradient" "', argument " "8"" of type '" "meep::grid_volume &""'"); 
  }
  if (!argp8) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "material_grids_addgradient" "', argument " "8"" of type '" "meep::grid_volume &""'"); 
  }
  arg8 = reinterpret_cast< meep::grid_volume * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9, SWIGTYPE_p_meep__volume,  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "material_grids_addgradient" "', argument " "9"" of type '" "meep::volume &""'"); 
  }
  if (!argp9) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "material_grids_addgradient" "', argument " "9"" of type '" "meep::volume &""'"); 
  }
  arg9 = reinterpret_cast< meep::volume * >(argp9);
  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "material_grids_addgradient" "', argument " "10"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg10 = reinterpret_cast< meep_geom::geom_epsilon * >(argp10);
  ecode11 = SWIG_AsVal_double(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "material_grids_addgradient" "', argument " "11"" of type '" "double""'");
  } 
  arg11 = static_cast< double >(val11);
  {
    try {
      meep_geom::material_grids_addgradient(arg1,arg2,arg3,arg4,arg5,arg6,arg7,*arg8,*arg9,arg10,arg11);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_material_grids_addgradient__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  size_t arg2 ;
  size_t arg3 ;
  SwigValueWrapper< std::vector< meep::dft_fields *,std::allocator< meep::dft_fields * > > > arg4 ;
  SwigValueWrapper< std::vector< meep::dft_fields *,std::allocator< meep::dft_fields * > > > arg5 ;
  double *arg6 = (double *) 0 ;
  double arg7 ;
  meep::grid_volume *arg8 = 0 ;
  meep::volume *arg9 = 0 ;
  meep_geom::geom_epsilon *arg10 = (meep_geom::geom_epsilon *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  size_t val3 ;
  int ecode3 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  void *argp5 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "material_grids_addgradient", 10, 10, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "material_grids_addgradient" "', argument " "1"" of type '" "double *""'"); 
  }
  arg1 = reinterpret_cast< double * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "material_grids_addgradient" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "material_grids_addgradient" "', argument " "3"" of type '" "size_t""'");
  } 
  arg3 = static_cast< size_t >(val3);
  {
    res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_std__vectorT_meep__dft_fields_p_std__allocatorT_meep__dft_fields_p_t_t,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "material_grids_addgradient" "', argument " "4"" of type '" "std::vector< meep::dft_fields *,std::allocator< meep::dft_fields * > >""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "material_grids_addgradient" "', argument " "4"" of type '" "std::vector< meep::dft_fields *,std::allocator< meep::dft_fields * > >""'");
    } else {
      std::vector< meep::dft_fields *,std::allocator< meep::dft_fields * > > * temp = reinterpret_cast< std::vector< meep::dft_fields *,std::allocator< meep::dft_fields * > > * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  {
    res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_std__vectorT_meep__dft_fields_p_std__allocatorT_meep__dft_fields_p_t_t,  0  | 0);
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "material_grids_addgradient" "', argument " "5"" of type '" "std::vector< meep::dft_fields *,std::allocator< meep::dft_fields * > >""'"); 
    }  
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "material_grids_addgradient" "', argument " "5"" of type '" "std::vector< meep::dft_fields *,std::allocator< meep::dft_fields * > >""'");
    } else {
      std::vector< meep::dft_fields *,std::allocator< meep::dft_fields * > > * temp = reinterpret_cast< std::vector< meep::dft_fields *,std::allocator< meep::dft_fields * > > * >(argp5);
      arg5 = *temp;
      if (SWIG_IsNewObj(res5)) delete temp;
    }
  }
  res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "material_grids_addgradient" "', argument " "6"" of type '" "double *""'"); 
  }
  arg6 = reinterpret_cast< double * >(argp6);
  ecode7 = SWIG_AsVal_double(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "material_grids_addgradient" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  res8 = SWIG_ConvertPtr(obj7, &argp8, SWIGTYPE_p_meep__grid_volume,  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "material_grids_addgradient" "', argument " "8"" of type '" "meep::grid_volume &""'"); 
  }
  if (!argp8) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "material_grids_addgradient" "', argument " "8"" of type '" "meep::grid_volume &""'"); 
  }
  arg8 = reinterpret_cast< meep::grid_volume * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9, SWIGTYPE_p_meep__volume,  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "material_grids_addgradient" "', argument " "9"" of type '" "meep::volume &""'"); 
  }
  if (!argp9) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "material_grids_addgradient" "', argument " "9"" of type '" "meep::volume &""'"); 
  }
  arg9 = reinterpret_cast< meep::volume * >(argp9);
  res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "material_grids_addgradient" "', argument " "10"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg10 = reinterpret_cast< meep_geom::geom_epsilon * >(argp10);
  {
    try {
      meep_geom::material_grids_addgradient(arg1,arg2,arg3,arg4,arg5,arg6,arg7,*arg8,*arg9,arg10);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_material_grids_addgradient(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[12] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 11) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 10) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_double, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_size_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_std__vectorT_meep__dft_fields_p_std__allocatorT_meep__dft_fields_p_t_t, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            int res = SWIG_ConvertPtr(argv[4], 0, SWIGTYPE_p_std__vectorT_meep__dft_fields_p_std__allocatorT_meep__dft_fields_p_t_t, SWIG_POINTER_NO_NULL | 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              void *vptr = 0;
              int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_double, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                {
                  int res = SWIG_AsVal_double(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      void *vptr = 0;
                      int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_meep_geom__geom_epsilon, 0);
                      _v = SWIG_CheckState(res);
                      if (_v) {
                        return _wrap_material_grids_addgradient__SWIG_1(self, args);
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 11) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_double, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_size_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_std__vectorT_meep__dft_fields_p_std__allocatorT_meep__dft_fields_p_t_t, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            int res = SWIG_ConvertPtr(argv[4], 0, SWIGTYPE_p_std__vectorT_meep__dft_fields_p_std__allocatorT_meep__dft_fields_p_t_t, SWIG_POINTER_NO_NULL | 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              void *vptr = 0;
              int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_double, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                {
                  int res = SWIG_AsVal_double(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  void *vptr = 0;
                  int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_NO_NULL);
                  _v = SWIG_CheckState(res);
                  if (_v) {
                    void *vptr = 0;
                    int res = SWIG_ConvertPtr(argv[8], &vptr, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL);
                    _v = SWIG_CheckState(res);
                    if (_v) {
                      void *vptr = 0;
                      int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_meep_geom__geom_epsilon, 0);
                      _v = SWIG_CheckState(res);
                      if (_v) {
                        {
                          int res = SWIG_AsVal_double(argv[10], NULL);
                          _v = SWIG_CheckState(res);
                        }
                        if (_v) {
                          return _wrap_material_grids_addgradient__SWIG_0(self, args);
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'material_grids_addgradient'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep_geom::material_grids_addgradient(double *,size_t,size_t,std::vector< meep::dft_fields *,std::allocator< meep::dft_fields * > >,std::vector< meep::dft_fields *,std::allocator< meep::dft_fields * > >,double *,double,meep::grid_volume &,meep::volume &,meep_geom::geom_epsilon *,double)\n"
    "    meep_geom::material_grids_addgradient(double *,size_t,size_t,std::vector< meep::dft_fields *,std::allocator< meep::dft_fields * > >,std::vector< meep::dft_fields *,std::allocator< meep::dft_fields * > >,double *,double,meep::grid_volume &,meep::volume &,meep_geom::geom_epsilon *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_with_libGDSII(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "with_libGDSII", 0, 0)) SWIG_fail;
  {
    try {
      result = (bool)meep_geom::with_libGDSII();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_set_geometry_from_GDSII__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  int arg4 ;
  double arg5 ;
  double val1 ;
  int ecode1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  meep::grid_volume result;
  
  if (!PyArg_UnpackTuple(args, "set_geometry_from_GDSII", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "set_geometry_from_GDSII" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "set_geometry_from_GDSII" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "set_geometry_from_GDSII" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "set_geometry_from_GDSII" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "set_geometry_from_GDSII" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      result = meep_geom::set_geometry_from_GDSII(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::grid_volume(static_cast< const meep::grid_volume& >(result))), SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_set_geometry_from_GDSII__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  int arg4 ;
  double val1 ;
  int ecode1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::grid_volume result;
  
  if (!PyArg_UnpackTuple(args, "set_geometry_from_GDSII", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "set_geometry_from_GDSII" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "set_geometry_from_GDSII" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "set_geometry_from_GDSII" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "set_geometry_from_GDSII" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    try {
      result = meep_geom::set_geometry_from_GDSII(arg1,(char const *)arg2,(char const *)arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::grid_volume(static_cast< const meep::grid_volume& >(result))), SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_set_geometry_from_GDSII__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::grid_volume result;
  
  if (!PyArg_UnpackTuple(args, "set_geometry_from_GDSII", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "set_geometry_from_GDSII" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "set_geometry_from_GDSII" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "set_geometry_from_GDSII" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try {
      result = meep_geom::set_geometry_from_GDSII(arg1,(char const *)arg2,(char const *)arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::grid_volume(static_cast< const meep::grid_volume& >(result))), SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_set_geometry_from_GDSII__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  double arg4 ;
  double val1 ;
  int ecode1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::grid_volume result;
  
  if (!PyArg_UnpackTuple(args, "set_geometry_from_GDSII", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "set_geometry_from_GDSII" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "set_geometry_from_GDSII" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "set_geometry_from_GDSII" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "set_geometry_from_GDSII" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  {
    try {
      result = meep_geom::set_geometry_from_GDSII(arg1,(char const *)arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::grid_volume(static_cast< const meep::grid_volume& >(result))), SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_set_geometry_from_GDSII__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  double val1 ;
  int ecode1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::grid_volume result;
  
  if (!PyArg_UnpackTuple(args, "set_geometry_from_GDSII", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "set_geometry_from_GDSII" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "set_geometry_from_GDSII" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "set_geometry_from_GDSII" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      result = meep_geom::set_geometry_from_GDSII(arg1,(char const *)arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::grid_volume(static_cast< const meep::grid_volume& >(result))), SWIGTYPE_p_meep__grid_volume, SWIG_POINTER_OWN |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_set_geometry_from_GDSII(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_set_geometry_from_GDSII__SWIG_4(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_set_geometry_from_GDSII__SWIG_2(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_set_geometry_from_GDSII__SWIG_3(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_set_geometry_from_GDSII__SWIG_1(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_set_geometry_from_GDSII__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'set_geometry_from_GDSII'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep_geom::set_geometry_from_GDSII(double,char const *,char const *,int,double)\n"
    "    meep_geom::set_geometry_from_GDSII(double,char const *,char const *,int)\n"
    "    meep_geom::set_geometry_from_GDSII(double,char const *,char const *)\n"
    "    meep_geom::set_geometry_from_GDSII(double,char const *,int,double)\n"
    "    meep_geom::set_geometry_from_GDSII(double,char const *,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_get_GDSII_prisms__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  material_type arg1 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  double arg4 ;
  double arg5 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  geometric_object_list result;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "get_GDSII_prisms", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  {
    if(!pymaterial_to_material(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_GDSII_prisms" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "get_GDSII_prisms" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "get_GDSII_prisms" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "get_GDSII_prisms" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      result = meep_geom::get_GDSII_prisms(arg1,(char const *)arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    resultobj = gobj_list_to_py_list(&result);
    
    if (!resultobj) {
      SWIG_fail;
    }
  }
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_GDSII_prisms__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  material_type arg1 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  double arg4 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  geometric_object_list result;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "get_GDSII_prisms", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  {
    if(!pymaterial_to_material(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_GDSII_prisms" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "get_GDSII_prisms" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "get_GDSII_prisms" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  {
    try {
      result = meep_geom::get_GDSII_prisms(arg1,(char const *)arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    resultobj = gobj_list_to_py_list(&result);
    
    if (!resultobj) {
      SWIG_fail;
    }
  }
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_GDSII_prisms__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  material_type arg1 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  geometric_object_list result;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "get_GDSII_prisms", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  {
    if(!pymaterial_to_material(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_GDSII_prisms" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "get_GDSII_prisms" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      result = meep_geom::get_GDSII_prisms(arg1,(char const *)arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    resultobj = gobj_list_to_py_list(&result);
    
    if (!resultobj) {
      SWIG_fail;
    }
  }
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_GDSII_prisms__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  material_type arg1 ;
  char *arg2 = (char *) 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  geometric_object_list result;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "get_GDSII_prisms", 2, 2, &obj0, &obj1)) SWIG_fail;
  {
    if(!pymaterial_to_material(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_GDSII_prisms" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try {
      result = meep_geom::get_GDSII_prisms(arg1,(char const *)arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    resultobj = gobj_list_to_py_list(&result);
    
    if (!resultobj) {
      SWIG_fail;
    }
  }
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_GDSII_prisms(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    {
      int py_material = PyObject_IsInstance(argv[0], py_material_object());
      int user_material = PyFunction_Check(argv[0]);
      int file_material = IsPyString(argv[0]);
      int numpy_material = PyArray_Check(argv[0]);
      
      _v = py_material || user_material || file_material || numpy_material;
    }
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_get_GDSII_prisms__SWIG_3(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int py_material = PyObject_IsInstance(argv[0], py_material_object());
      int user_material = PyFunction_Check(argv[0]);
      int file_material = IsPyString(argv[0]);
      int numpy_material = PyArray_Check(argv[0]);
      
      _v = py_material || user_material || file_material || numpy_material;
    }
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_get_GDSII_prisms__SWIG_2(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      int py_material = PyObject_IsInstance(argv[0], py_material_object());
      int user_material = PyFunction_Check(argv[0]);
      int file_material = IsPyString(argv[0]);
      int numpy_material = PyArray_Check(argv[0]);
      
      _v = py_material || user_material || file_material || numpy_material;
    }
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_get_GDSII_prisms__SWIG_1(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      int py_material = PyObject_IsInstance(argv[0], py_material_object());
      int user_material = PyFunction_Check(argv[0]);
      int file_material = IsPyString(argv[0]);
      int numpy_material = PyArray_Check(argv[0]);
      
      _v = py_material || user_material || file_material || numpy_material;
    }
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_get_GDSII_prisms__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'get_GDSII_prisms'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep_geom::get_GDSII_prisms(material_type,char const *,int,double,double)\n"
    "    meep_geom::get_GDSII_prisms(material_type,char const *,int,double)\n"
    "    meep_geom::get_GDSII_prisms(material_type,char const *,int)\n"
    "    meep_geom::get_GDSII_prisms(material_type,char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_get_GDSII_prism__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  material_type arg1 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  int arg4 ;
  double arg5 ;
  double arg6 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  geometric_object result;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "get_GDSII_prism", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  {
    if(!pymaterial_to_material(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_GDSII_prism" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "get_GDSII_prism" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "get_GDSII_prism" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "get_GDSII_prism" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "get_GDSII_prism" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  {
    try {
      result = meep_geom::get_GDSII_prism(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    resultobj = gobj_to_py_obj(&result);
    
    if (!resultobj) {
      SWIG_fail;
    }
  }
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_GDSII_prism__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  material_type arg1 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  int arg4 ;
  double arg5 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  geometric_object result;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "get_GDSII_prism", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  {
    if(!pymaterial_to_material(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_GDSII_prism" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "get_GDSII_prism" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "get_GDSII_prism" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "get_GDSII_prism" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      result = meep_geom::get_GDSII_prism(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    resultobj = gobj_to_py_obj(&result);
    
    if (!resultobj) {
      SWIG_fail;
    }
  }
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_GDSII_prism__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  material_type arg1 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  int arg4 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  geometric_object result;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "get_GDSII_prism", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  {
    if(!pymaterial_to_material(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_GDSII_prism" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "get_GDSII_prism" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "get_GDSII_prism" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    try {
      result = meep_geom::get_GDSII_prism(arg1,(char const *)arg2,(char const *)arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    resultobj = gobj_to_py_obj(&result);
    
    if (!resultobj) {
      SWIG_fail;
    }
  }
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_GDSII_prism__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  material_type arg1 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  geometric_object result;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "get_GDSII_prism", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  {
    if(!pymaterial_to_material(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_GDSII_prism" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "get_GDSII_prism" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    try {
      result = meep_geom::get_GDSII_prism(arg1,(char const *)arg2,(char const *)arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    resultobj = gobj_to_py_obj(&result);
    
    if (!resultobj) {
      SWIG_fail;
    }
  }
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_GDSII_prism__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  material_type arg1 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  double arg4 ;
  double arg5 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  geometric_object result;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "get_GDSII_prism", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  {
    if(!pymaterial_to_material(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_GDSII_prism" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "get_GDSII_prism" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "get_GDSII_prism" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "get_GDSII_prism" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      result = meep_geom::get_GDSII_prism(arg1,(char const *)arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    resultobj = gobj_to_py_obj(&result);
    
    if (!resultobj) {
      SWIG_fail;
    }
  }
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_GDSII_prism__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  material_type arg1 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  double arg4 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  geometric_object result;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "get_GDSII_prism", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  {
    if(!pymaterial_to_material(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_GDSII_prism" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "get_GDSII_prism" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "get_GDSII_prism" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  {
    try {
      result = meep_geom::get_GDSII_prism(arg1,(char const *)arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    resultobj = gobj_to_py_obj(&result);
    
    if (!resultobj) {
      SWIG_fail;
    }
  }
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_GDSII_prism__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  material_type arg1 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  geometric_object result;
  
  {
    arg1 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "get_GDSII_prism", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  {
    if(!pymaterial_to_material(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_GDSII_prism" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "get_GDSII_prism" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      result = meep_geom::get_GDSII_prism(arg1,(char const *)arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    resultobj = gobj_to_py_obj(&result);
    
    if (!resultobj) {
      SWIG_fail;
    }
  }
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  {
    if (arg1) {
      material_free(arg1);
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_GDSII_prism(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[7] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    {
      int py_material = PyObject_IsInstance(argv[0], py_material_object());
      int user_material = PyFunction_Check(argv[0]);
      int file_material = IsPyString(argv[0]);
      int numpy_material = PyArray_Check(argv[0]);
      
      _v = py_material || user_material || file_material || numpy_material;
    }
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_get_GDSII_prism__SWIG_6(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int py_material = PyObject_IsInstance(argv[0], py_material_object());
      int user_material = PyFunction_Check(argv[0]);
      int file_material = IsPyString(argv[0]);
      int numpy_material = PyArray_Check(argv[0]);
      
      _v = py_material || user_material || file_material || numpy_material;
    }
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_get_GDSII_prism__SWIG_3(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      int py_material = PyObject_IsInstance(argv[0], py_material_object());
      int user_material = PyFunction_Check(argv[0]);
      int file_material = IsPyString(argv[0]);
      int numpy_material = PyArray_Check(argv[0]);
      
      _v = py_material || user_material || file_material || numpy_material;
    }
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_get_GDSII_prism__SWIG_5(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      int py_material = PyObject_IsInstance(argv[0], py_material_object());
      int user_material = PyFunction_Check(argv[0]);
      int file_material = IsPyString(argv[0]);
      int numpy_material = PyArray_Check(argv[0]);
      
      _v = py_material || user_material || file_material || numpy_material;
    }
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_get_GDSII_prism__SWIG_2(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      int py_material = PyObject_IsInstance(argv[0], py_material_object());
      int user_material = PyFunction_Check(argv[0]);
      int file_material = IsPyString(argv[0]);
      int numpy_material = PyArray_Check(argv[0]);
      
      _v = py_material || user_material || file_material || numpy_material;
    }
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_get_GDSII_prism__SWIG_4(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      int py_material = PyObject_IsInstance(argv[0], py_material_object());
      int user_material = PyFunction_Check(argv[0]);
      int file_material = IsPyString(argv[0]);
      int numpy_material = PyArray_Check(argv[0]);
      
      _v = py_material || user_material || file_material || numpy_material;
    }
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_get_GDSII_prism__SWIG_1(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    {
      int py_material = PyObject_IsInstance(argv[0], py_material_object());
      int user_material = PyFunction_Check(argv[0]);
      int file_material = IsPyString(argv[0]);
      int numpy_material = PyArray_Check(argv[0]);
      
      _v = py_material || user_material || file_material || numpy_material;
    }
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_get_GDSII_prism__SWIG_0(self, args);
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'get_GDSII_prism'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep_geom::get_GDSII_prism(material_type,char const *,char const *,int,double,double)\n"
    "    meep_geom::get_GDSII_prism(material_type,char const *,char const *,int,double)\n"
    "    meep_geom::get_GDSII_prism(material_type,char const *,char const *,int)\n"
    "    meep_geom::get_GDSII_prism(material_type,char const *,char const *)\n"
    "    meep_geom::get_GDSII_prism(material_type,char const *,int,double,double)\n"
    "    meep_geom::get_GDSII_prism(material_type,char const *,int,double)\n"
    "    meep_geom::get_GDSII_prism(material_type,char const *,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_get_GDSII_volume__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  double arg4 ;
  double arg5 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  SwigValueWrapper< meep::volume > result;
  
  if (!PyArg_UnpackTuple(args, "get_GDSII_volume", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_GDSII_volume" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_GDSII_volume" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "get_GDSII_volume" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "get_GDSII_volume" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "get_GDSII_volume" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      result = meep_geom::get_GDSII_volume((char const *)arg1,(char const *)arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::volume(static_cast< const meep::volume& >(result))), SWIGTYPE_p_meep__volume, SWIG_POINTER_OWN |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_GDSII_volume__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  double arg4 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  SwigValueWrapper< meep::volume > result;
  
  if (!PyArg_UnpackTuple(args, "get_GDSII_volume", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_GDSII_volume" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_GDSII_volume" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "get_GDSII_volume" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "get_GDSII_volume" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  {
    try {
      result = meep_geom::get_GDSII_volume((char const *)arg1,(char const *)arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::volume(static_cast< const meep::volume& >(result))), SWIGTYPE_p_meep__volume, SWIG_POINTER_OWN |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_GDSII_volume__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  SwigValueWrapper< meep::volume > result;
  
  if (!PyArg_UnpackTuple(args, "get_GDSII_volume", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_GDSII_volume" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_GDSII_volume" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "get_GDSII_volume" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      result = meep_geom::get_GDSII_volume((char const *)arg1,(char const *)arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::volume(static_cast< const meep::volume& >(result))), SWIGTYPE_p_meep__volume, SWIG_POINTER_OWN |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_GDSII_volume__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  SwigValueWrapper< meep::volume > result;
  
  if (!PyArg_UnpackTuple(args, "get_GDSII_volume", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_GDSII_volume" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_GDSII_volume" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    try {
      result = meep_geom::get_GDSII_volume((char const *)arg1,(char const *)arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::volume(static_cast< const meep::volume& >(result))), SWIGTYPE_p_meep__volume, SWIG_POINTER_OWN |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_GDSII_volume__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  SwigValueWrapper< meep::volume > result;
  
  if (!PyArg_UnpackTuple(args, "get_GDSII_volume", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_GDSII_volume" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "get_GDSII_volume" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "get_GDSII_volume" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "get_GDSII_volume" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  {
    try {
      result = meep_geom::get_GDSII_volume((char const *)arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::volume(static_cast< const meep::volume& >(result))), SWIGTYPE_p_meep__volume, SWIG_POINTER_OWN |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_GDSII_volume__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  double arg3 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  SwigValueWrapper< meep::volume > result;
  
  if (!PyArg_UnpackTuple(args, "get_GDSII_volume", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_GDSII_volume" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "get_GDSII_volume" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "get_GDSII_volume" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      result = meep_geom::get_GDSII_volume((char const *)arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::volume(static_cast< const meep::volume& >(result))), SWIGTYPE_p_meep__volume, SWIG_POINTER_OWN |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_GDSII_volume__SWIG_6(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  SwigValueWrapper< meep::volume > result;
  
  if (!PyArg_UnpackTuple(args, "get_GDSII_volume", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_GDSII_volume" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "get_GDSII_volume" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      result = meep_geom::get_GDSII_volume((char const *)arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new meep::volume(static_cast< const meep::volume& >(result))), SWIGTYPE_p_meep__volume, SWIG_POINTER_OWN |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_GDSII_volume(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_get_GDSII_volume__SWIG_6(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_get_GDSII_volume__SWIG_3(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_get_GDSII_volume__SWIG_5(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_get_GDSII_volume__SWIG_2(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_get_GDSII_volume__SWIG_4(self, args);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_get_GDSII_volume__SWIG_1(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_get_GDSII_volume__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'get_GDSII_volume'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep_geom::get_GDSII_volume(char const *,char const *,int,double,double)\n"
    "    meep_geom::get_GDSII_volume(char const *,char const *,int,double)\n"
    "    meep_geom::get_GDSII_volume(char const *,char const *,int)\n"
    "    meep_geom::get_GDSII_volume(char const *,char const *)\n"
    "    meep_geom::get_GDSII_volume(char const *,int,double,double)\n"
    "    meep_geom::get_GDSII_volume(char const *,int,double)\n"
    "    meep_geom::get_GDSII_volume(char const *,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_get_GDSII_layers(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< int,std::allocator< int > > result;
  
  if (!PyArg_UnpackTuple(args, "get_GDSII_layers", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_GDSII_layers" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    try {
      result = meep_geom::get_GDSII_layers((char const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    npy_intp vec_len = (npy_intp) (&result)->size();
    resultobj = PyArray_SimpleNew(1, &vec_len, NPY_INT);
    memcpy(PyArray_DATA((PyArrayObject*) resultobj), &result[0], vec_len * sizeof(int));
  }
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_custom_py_src_time__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  double arg2 ;
  double arg3 ;
  std::complex< double > arg4 ;
  double arg5 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  std::complex< double > val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  meep::custom_py_src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_custom_py_src_time", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  arg1 = obj0;
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_custom_py_src_time" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_custom_py_src_time" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_custom_py_src_time" "', argument " "4"" of type '" "std::complex< double >""'");
  } 
  arg4 = static_cast< std::complex< double > >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_custom_py_src_time" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      result = (meep::custom_py_src_time *)new meep::custom_py_src_time(arg1,arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__custom_py_src_time, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_custom_py_src_time__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  double arg2 ;
  double arg3 ;
  std::complex< double > arg4 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  std::complex< double > val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  meep::custom_py_src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_custom_py_src_time", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  arg1 = obj0;
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_custom_py_src_time" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_custom_py_src_time" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_custom_py_src_time" "', argument " "4"" of type '" "std::complex< double >""'");
  } 
  arg4 = static_cast< std::complex< double > >(val4);
  {
    try {
      result = (meep::custom_py_src_time *)new meep::custom_py_src_time(arg1,arg2,arg3,arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__custom_py_src_time, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_custom_py_src_time__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  double arg2 ;
  double arg3 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  meep::custom_py_src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_custom_py_src_time", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  arg1 = obj0;
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_custom_py_src_time" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_custom_py_src_time" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      result = (meep::custom_py_src_time *)new meep::custom_py_src_time(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__custom_py_src_time, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_custom_py_src_time__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  double arg2 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  meep::custom_py_src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_custom_py_src_time", 2, 2, &obj0, &obj1)) SWIG_fail;
  arg1 = obj0;
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_custom_py_src_time" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = (meep::custom_py_src_time *)new meep::custom_py_src_time(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__custom_py_src_time, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_custom_py_src_time__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  PyObject * obj0 = 0 ;
  meep::custom_py_src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_custom_py_src_time", 1, 1, &obj0)) SWIG_fail;
  arg1 = obj0;
  {
    try {
      result = (meep::custom_py_src_time *)new meep::custom_py_src_time(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__custom_py_src_time, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_custom_py_src_time(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[6] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 5) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 1) {
    int _v;
    _v = (argv[0] != 0);
    if (_v) {
      return _wrap_new_custom_py_src_time__SWIG_4(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    _v = (argv[0] != 0);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_custom_py_src_time__SWIG_3(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    _v = (argv[0] != 0);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new_custom_py_src_time__SWIG_2(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    _v = (argv[0] != 0);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_new_custom_py_src_time__SWIG_1(self, args);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    _v = (argv[0] != 0);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_new_custom_py_src_time__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_custom_py_src_time'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    meep::custom_py_src_time::custom_py_src_time(PyObject *,double,double,std::complex< double >,double)\n"
    "    meep::custom_py_src_time::custom_py_src_time(PyObject *,double,double,std::complex< double >)\n"
    "    meep::custom_py_src_time::custom_py_src_time(PyObject *,double,double)\n"
    "    meep::custom_py_src_time::custom_py_src_time(PyObject *,double)\n"
    "    meep::custom_py_src_time::custom_py_src_time(PyObject *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_custom_py_src_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::custom_py_src_time *arg1 = (meep::custom_py_src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_custom_py_src_time", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__custom_py_src_time, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_custom_py_src_time" "', argument " "1"" of type '" "meep::custom_py_src_time *""'"); 
  }
  arg1 = reinterpret_cast< meep::custom_py_src_time * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_custom_py_src_time_current(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::custom_py_src_time *arg1 = (meep::custom_py_src_time *) 0 ;
  double arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "custom_py_src_time_current", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__custom_py_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "custom_py_src_time_current" "', argument " "1"" of type '" "meep::custom_py_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::custom_py_src_time * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "custom_py_src_time_current" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "custom_py_src_time_current" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      result = ((meep::custom_py_src_time const *)arg1)->current(arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_custom_py_src_time_dipole(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::custom_py_src_time *arg1 = (meep::custom_py_src_time *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "custom_py_src_time_dipole", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__custom_py_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "custom_py_src_time_dipole" "', argument " "1"" of type '" "meep::custom_py_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::custom_py_src_time * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "custom_py_src_time_dipole" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      result = ((meep::custom_py_src_time const *)arg1)->dipole(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_custom_py_src_time_last_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::custom_py_src_time *arg1 = (meep::custom_py_src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "custom_py_src_time_last_time", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__custom_py_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "custom_py_src_time_last_time" "', argument " "1"" of type '" "meep::custom_py_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::custom_py_src_time * >(argp1);
  {
    try {
      result = (double)((meep::custom_py_src_time const *)arg1)->last_time();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_custom_py_src_time_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::custom_py_src_time *arg1 = (meep::custom_py_src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::src_time *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "custom_py_src_time_clone", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__custom_py_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "custom_py_src_time_clone" "', argument " "1"" of type '" "meep::custom_py_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::custom_py_src_time * >(argp1);
  {
    try {
      result = (meep::src_time *)((meep::custom_py_src_time const *)arg1)->clone();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__src_time, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_custom_py_src_time_is_equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::custom_py_src_time *arg1 = (meep::custom_py_src_time *) 0 ;
  meep::src_time *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "custom_py_src_time_is_equal", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__custom_py_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "custom_py_src_time_is_equal" "', argument " "1"" of type '" "meep::custom_py_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::custom_py_src_time * >(argp1);
  {
    PyObject *swig_obj = NULL;
    void *tmp_ptr = 0;
    int tmp_res = 0;
    
    if(PyObject_IsInstance(obj1, py_source_time_object())) {
      swig_obj = PyObject_GetAttrString(obj1, "swigobj");
    } else if(PyObject_IsInstance(obj1, py_meep_src_time_object())) {
      swig_obj = obj1;
      Py_XINCREF(swig_obj);
    } else {
      meep::abort("Expected a meep.source.SourceTime or a meep.src_time\n");
    }
    
    tmp_res = SWIG_ConvertPtr(swig_obj, &tmp_ptr, SWIGTYPE_p_meep__src_time, 0);
    Py_XDECREF(swig_obj);
    
    if(!SWIG_IsOK(tmp_res)) {
      SWIG_exception_fail(SWIG_ArgError(tmp_res), "Couldn't convert Python object to meep::src_time");
    }
    arg2 = reinterpret_cast<meep::src_time *>(tmp_ptr);
    
  }
  {
    try {
      result = (bool)((meep::custom_py_src_time const *)arg1)->is_equal((meep::src_time const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_custom_py_src_time_frequency(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::custom_py_src_time *arg1 = (meep::custom_py_src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::complex< double > result;
  
  if (!PyArg_UnpackTuple(args, "custom_py_src_time_frequency", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__custom_py_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "custom_py_src_time_frequency" "', argument " "1"" of type '" "meep::custom_py_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::custom_py_src_time * >(argp1);
  {
    try {
      result = ((meep::custom_py_src_time const *)arg1)->frequency();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_custom_py_src_time_set_frequency(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::custom_py_src_time *arg1 = (meep::custom_py_src_time *) 0 ;
  std::complex< double > arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::complex< double > val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "custom_py_src_time_set_frequency", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__custom_py_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "custom_py_src_time_set_frequency" "', argument " "1"" of type '" "meep::custom_py_src_time *""'"); 
  }
  arg1 = reinterpret_cast< meep::custom_py_src_time * >(argp1);
  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "custom_py_src_time_set_frequency" "', argument " "2"" of type '" "std::complex< double >""'");
  } 
  arg2 = static_cast< std::complex< double > >(val2);
  {
    try {
      (arg1)->set_frequency(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_custom_py_src_time_get_fwidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::custom_py_src_time *arg1 = (meep::custom_py_src_time *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "custom_py_src_time_get_fwidth", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__custom_py_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "custom_py_src_time_get_fwidth" "', argument " "1"" of type '" "meep::custom_py_src_time const *""'"); 
  }
  arg1 = reinterpret_cast< meep::custom_py_src_time * >(argp1);
  {
    try {
      result = (double)((meep::custom_py_src_time const *)arg1)->get_fwidth();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_custom_py_src_time_set_fwidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::custom_py_src_time *arg1 = (meep::custom_py_src_time *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "custom_py_src_time_set_fwidth", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__custom_py_src_time, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "custom_py_src_time_set_fwidth" "', argument " "1"" of type '" "meep::custom_py_src_time *""'"); 
  }
  arg1 = reinterpret_cast< meep::custom_py_src_time * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "custom_py_src_time_set_fwidth" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      (arg1)->set_fwidth(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *custom_py_src_time_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__custom_py_src_time, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *custom_py_src_time_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_near_src_data_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  PyObject **arg2 = (PyObject **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  arg2 = &obj0;
  if (!PyArg_UnpackTuple(args, "near_src_data_iterator", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data_iterator" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  {
    try {
      result = (swig::SwigPyIterator *)std_vector_Sl_meep_sourcedata_Sg__iterator(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "near_src_data___nonzero__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data___nonzero__" "', argument " "1"" of type '" "std::vector< meep::sourcedata > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  {
    try {
      result = (bool)std_vector_Sl_meep_sourcedata_Sg____nonzero__((std::vector< meep::sourcedata > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "near_src_data___bool__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data___bool__" "', argument " "1"" of type '" "std::vector< meep::sourcedata > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  {
    try {
      result = (bool)std_vector_Sl_meep_sourcedata_Sg____bool__((std::vector< meep::sourcedata > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::sourcedata >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "near_src_data___len__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data___len__" "', argument " "1"" of type '" "std::vector< meep::sourcedata > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  {
    try {
      result = std_vector_Sl_meep_sourcedata_Sg____len__((std::vector< meep::sourcedata > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  std::vector< meep::sourcedata >::difference_type arg2 ;
  std::vector< meep::sourcedata >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "near_src_data___getslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data___getslice__" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "near_src_data___getslice__" "', argument " "2"" of type '" "std::vector< meep::sourcedata >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep::sourcedata >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "near_src_data___getslice__" "', argument " "3"" of type '" "std::vector< meep::sourcedata >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< meep::sourcedata >::difference_type >(val3);
  {
    try {
      try {
        result = (std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > *)std_vector_Sl_meep_sourcedata_Sg____getslice__(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  std::vector< meep::sourcedata >::difference_type arg2 ;
  std::vector< meep::sourcedata >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "near_src_data___setslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data___setslice__" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "near_src_data___setslice__" "', argument " "2"" of type '" "std::vector< meep::sourcedata >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep::sourcedata >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "near_src_data___setslice__" "', argument " "3"" of type '" "std::vector< meep::sourcedata >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< meep::sourcedata >::difference_type >(val3);
  {
    try {
      try {
        std_vector_Sl_meep_sourcedata_Sg____setslice____SWIG_0(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  std::vector< meep::sourcedata >::difference_type arg2 ;
  std::vector< meep::sourcedata >::difference_type arg3 ;
  std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "near_src_data___setslice__", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data___setslice__" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "near_src_data___setslice__" "', argument " "2"" of type '" "std::vector< meep::sourcedata >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep::sourcedata >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "near_src_data___setslice__" "', argument " "3"" of type '" "std::vector< meep::sourcedata >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< meep::sourcedata >::difference_type >(val3);
  {
    std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > *ptr = (std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "near_src_data___setslice__" "', argument " "4"" of type '" "std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "near_src_data___setslice__" "', argument " "4"" of type '" "std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > const &""'"); 
    }
    arg4 = ptr;
  }
  {
    try {
      try {
        std_vector_Sl_meep_sourcedata_Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > const &)*arg4);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data___setslice__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_near_src_data___setslice____SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_near_src_data___setslice____SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'near_src_data___setslice__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep::sourcedata >::__setslice__(std::vector< meep::sourcedata >::difference_type,std::vector< meep::sourcedata >::difference_type)\n"
    "    std::vector< meep::sourcedata >::__setslice__(std::vector< meep::sourcedata >::difference_type,std::vector< meep::sourcedata >::difference_type,std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_near_src_data___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  std::vector< meep::sourcedata >::difference_type arg2 ;
  std::vector< meep::sourcedata >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "near_src_data___delslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data___delslice__" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "near_src_data___delslice__" "', argument " "2"" of type '" "std::vector< meep::sourcedata >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep::sourcedata >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "near_src_data___delslice__" "', argument " "3"" of type '" "std::vector< meep::sourcedata >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< meep::sourcedata >::difference_type >(val3);
  {
    try {
      try {
        std_vector_Sl_meep_sourcedata_Sg____delslice__(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  std::vector< meep::sourcedata >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "near_src_data___delitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data___delitem__" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "near_src_data___delitem__" "', argument " "2"" of type '" "std::vector< meep::sourcedata >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep::sourcedata >::difference_type >(val2);
  {
    try {
      try {
        std_vector_Sl_meep_sourcedata_Sg____delitem____SWIG_0(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "near_src_data___getitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data___getitem__" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "near_src_data___getitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        result = (std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > *)std_vector_Sl_meep_sourcedata_Sg____getitem____SWIG_0(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "near_src_data___setitem__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data___setitem__" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "near_src_data___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > *ptr = (std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "near_src_data___setitem__" "', argument " "3"" of type '" "std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "near_src_data___setitem__" "', argument " "3"" of type '" "std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      try {
        std_vector_Sl_meep_sourcedata_Sg____setitem____SWIG_0(arg1,arg2,(std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > const &)*arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "near_src_data___setitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data___setitem__" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "near_src_data___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        std_vector_Sl_meep_sourcedata_Sg____setitem____SWIG_1(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "near_src_data___delitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data___delitem__" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "near_src_data___delitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        std_vector_Sl_meep_sourcedata_Sg____delitem____SWIG_1(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data___delitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_near_src_data___delitem____SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_near_src_data___delitem____SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'near_src_data___delitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep::sourcedata >::__delitem__(std::vector< meep::sourcedata >::difference_type)\n"
    "    std::vector< meep::sourcedata >::__delitem__(PySliceObject *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_near_src_data___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  std::vector< meep::sourcedata >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< meep::sourcedata >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "near_src_data___getitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data___getitem__" "', argument " "1"" of type '" "std::vector< meep::sourcedata > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "near_src_data___getitem__" "', argument " "2"" of type '" "std::vector< meep::sourcedata >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep::sourcedata >::difference_type >(val2);
  {
    try {
      try {
        result = (std::vector< meep::sourcedata >::value_type *) &std_vector_Sl_meep_sourcedata_Sg____getitem____SWIG_1((std::vector< meep::sourcedata > const *)arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__sourcedata, 0 |  0 );
  (void)swig::container_owner<swig::traits<std::vector< meep::sourcedata >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data___getitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_near_src_data___getitem____SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_near_src_data___getitem____SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'near_src_data___getitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep::sourcedata >::__getitem__(PySliceObject *)\n"
    "    std::vector< meep::sourcedata >::__getitem__(std::vector< meep::sourcedata >::difference_type) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_near_src_data___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  std::vector< meep::sourcedata >::difference_type arg2 ;
  std::vector< meep::sourcedata >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "near_src_data___setitem__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data___setitem__" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "near_src_data___setitem__" "', argument " "2"" of type '" "std::vector< meep::sourcedata >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< meep::sourcedata >::difference_type >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__sourcedata,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "near_src_data___setitem__" "', argument " "3"" of type '" "std::vector< meep::sourcedata >::value_type const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "near_src_data___setitem__" "', argument " "3"" of type '" "std::vector< meep::sourcedata >::value_type const &""'"); 
  }
  arg3 = reinterpret_cast< std::vector< meep::sourcedata >::value_type * >(argp3);
  {
    try {
      try {
        std_vector_Sl_meep_sourcedata_Sg____setitem____SWIG_2(arg1,arg2,(meep::sourcedata const &)*arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data___setitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_near_src_data___setitem____SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_near_src_data___setitem____SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__sourcedata, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_near_src_data___setitem____SWIG_2(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'near_src_data___setitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep::sourcedata >::__setitem__(PySliceObject *,std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > const &)\n"
    "    std::vector< meep::sourcedata >::__setitem__(PySliceObject *)\n"
    "    std::vector< meep::sourcedata >::__setitem__(std::vector< meep::sourcedata >::difference_type,std::vector< meep::sourcedata >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_near_src_data_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::sourcedata >::value_type result;
  
  if (!PyArg_UnpackTuple(args, "near_src_data_pop", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data_pop" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  {
    try {
      try {
        result = std_vector_Sl_meep_sourcedata_Sg__pop(arg1);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new std::vector< meep::sourcedata >::value_type(static_cast< const std::vector< meep::sourcedata >::value_type& >(result))), SWIGTYPE_p_meep__sourcedata, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  std::vector< meep::sourcedata >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "near_src_data_append", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data_append" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__sourcedata,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "near_src_data_append" "', argument " "2"" of type '" "std::vector< meep::sourcedata >::value_type const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "near_src_data_append" "', argument " "2"" of type '" "std::vector< meep::sourcedata >::value_type const &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< meep::sourcedata >::value_type * >(argp2);
  {
    try {
      std_vector_Sl_meep_sourcedata_Sg__append(arg1,(meep::sourcedata const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_near_src_data__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_near_src_data", 0, 0)) SWIG_fail;
  {
    try {
      result = (std::vector< meep::sourcedata > *)new std::vector< meep::sourcedata >();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_near_src_data__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  std::vector< meep::sourcedata > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_near_src_data", 1, 1, &obj0)) SWIG_fail;
  {
    std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > *ptr = (std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > *)0;
    res1 = swig::asptr(obj0, &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_near_src_data" "', argument " "1"" of type '" "std::vector< meep::sourcedata > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_near_src_data" "', argument " "1"" of type '" "std::vector< meep::sourcedata > const &""'"); 
    }
    arg1 = ptr;
  }
  {
    try {
      result = (std::vector< meep::sourcedata > *)new std::vector< meep::sourcedata >((std::vector< meep::sourcedata > const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "near_src_data_empty", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data_empty" "', argument " "1"" of type '" "std::vector< meep::sourcedata > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  {
    try {
      result = (bool)((std::vector< meep::sourcedata > const *)arg1)->empty();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::sourcedata >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "near_src_data_size", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data_size" "', argument " "1"" of type '" "std::vector< meep::sourcedata > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  {
    try {
      result = ((std::vector< meep::sourcedata > const *)arg1)->size();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  std::vector< meep::sourcedata > *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "near_src_data_swap", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data_swap" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "near_src_data_swap" "', argument " "2"" of type '" "std::vector< meep::sourcedata > &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "near_src_data_swap" "', argument " "2"" of type '" "std::vector< meep::sourcedata > &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp2);
  {
    try {
      (arg1)->swap(*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::sourcedata >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "near_src_data_begin", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data_begin" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  {
    try {
      result = (arg1)->begin();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep::sourcedata >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::sourcedata >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "near_src_data_end", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data_end" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  {
    try {
      result = (arg1)->end();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep::sourcedata >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::sourcedata >::reverse_iterator result;
  
  if (!PyArg_UnpackTuple(args, "near_src_data_rbegin", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data_rbegin" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  {
    try {
      result = (arg1)->rbegin();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep::sourcedata >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::sourcedata >::reverse_iterator result;
  
  if (!PyArg_UnpackTuple(args, "near_src_data_rend", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data_rend" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  {
    try {
      result = (arg1)->rend();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep::sourcedata >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "near_src_data_clear", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data_clear" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  {
    try {
      (arg1)->clear();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  SwigValueWrapper< std::allocator< meep::sourcedata > > result;
  
  if (!PyArg_UnpackTuple(args, "near_src_data_get_allocator", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data_get_allocator" "', argument " "1"" of type '" "std::vector< meep::sourcedata > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  {
    try {
      result = ((std::vector< meep::sourcedata > const *)arg1)->get_allocator();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new std::vector< meep::sourcedata >::allocator_type(static_cast< const std::vector< meep::sourcedata >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_meep__sourcedata_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_near_src_data__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata >::size_type arg1 ;
  size_t val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::sourcedata > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_near_src_data", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_near_src_data" "', argument " "1"" of type '" "std::vector< meep::sourcedata >::size_type""'");
  } 
  arg1 = static_cast< std::vector< meep::sourcedata >::size_type >(val1);
  {
    try {
      result = (std::vector< meep::sourcedata > *)new std::vector< meep::sourcedata >(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "near_src_data_pop_back", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data_pop_back" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  {
    try {
      (arg1)->pop_back();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  std::vector< meep::sourcedata >::size_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "near_src_data_resize", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data_resize" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "near_src_data_resize" "', argument " "2"" of type '" "std::vector< meep::sourcedata >::size_type""'");
  } 
  arg2 = static_cast< std::vector< meep::sourcedata >::size_type >(val2);
  {
    try {
      (arg1)->resize(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  std::vector< meep::sourcedata >::iterator arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< meep::sourcedata >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "near_src_data_erase", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data_erase" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "near_src_data_erase" "', argument " "2"" of type '" "std::vector< meep::sourcedata >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< meep::sourcedata >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::sourcedata >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "near_src_data_erase" "', argument " "2"" of type '" "std::vector< meep::sourcedata >::iterator""'");
    }
  }
  {
    try {
      result = std_vector_Sl_meep_sourcedata_Sg__erase__SWIG_0(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep::sourcedata >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  std::vector< meep::sourcedata >::iterator arg2 ;
  std::vector< meep::sourcedata >::iterator arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  swig::SwigPyIterator *iter3 = 0 ;
  int res3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< meep::sourcedata >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "near_src_data_erase", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data_erase" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "near_src_data_erase" "', argument " "2"" of type '" "std::vector< meep::sourcedata >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< meep::sourcedata >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::sourcedata >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "near_src_data_erase" "', argument " "2"" of type '" "std::vector< meep::sourcedata >::iterator""'");
    }
  }
  res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res3) || !iter3) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "near_src_data_erase" "', argument " "3"" of type '" "std::vector< meep::sourcedata >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< meep::sourcedata >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::sourcedata >::iterator > *>(iter3);
    if (iter_t) {
      arg3 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "near_src_data_erase" "', argument " "3"" of type '" "std::vector< meep::sourcedata >::iterator""'");
    }
  }
  {
    try {
      result = std_vector_Sl_meep_sourcedata_Sg__erase__SWIG_1(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep::sourcedata >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data_erase(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::sourcedata >::iterator > *>(iter) != 0));
      if (_v) {
        return _wrap_near_src_data_erase__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::sourcedata >::iterator > *>(iter) != 0));
      if (_v) {
        swig::SwigPyIterator *iter = 0;
        int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
        _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::sourcedata >::iterator > *>(iter) != 0));
        if (_v) {
          return _wrap_near_src_data_erase__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'near_src_data_erase'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep::sourcedata >::erase(std::vector< meep::sourcedata >::iterator)\n"
    "    std::vector< meep::sourcedata >::erase(std::vector< meep::sourcedata >::iterator,std::vector< meep::sourcedata >::iterator)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_new_near_src_data__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata >::size_type arg1 ;
  std::vector< meep::sourcedata >::value_type *arg2 = 0 ;
  size_t val1 ;
  int ecode1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< meep::sourcedata > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_near_src_data", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_near_src_data" "', argument " "1"" of type '" "std::vector< meep::sourcedata >::size_type""'");
  } 
  arg1 = static_cast< std::vector< meep::sourcedata >::size_type >(val1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__sourcedata,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_near_src_data" "', argument " "2"" of type '" "std::vector< meep::sourcedata >::value_type const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_near_src_data" "', argument " "2"" of type '" "std::vector< meep::sourcedata >::value_type const &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< meep::sourcedata >::value_type * >(argp2);
  {
    try {
      result = (std::vector< meep::sourcedata > *)new std::vector< meep::sourcedata >(arg1,(std::vector< meep::sourcedata >::value_type const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_near_src_data(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_near_src_data__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_near_src_data__SWIG_2(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_near_src_data__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__sourcedata, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_new_near_src_data__SWIG_3(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_near_src_data'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep::sourcedata >::vector()\n"
    "    std::vector< meep::sourcedata >::vector(std::vector< meep::sourcedata > const &)\n"
    "    std::vector< meep::sourcedata >::vector(std::vector< meep::sourcedata >::size_type)\n"
    "    std::vector< meep::sourcedata >::vector(std::vector< meep::sourcedata >::size_type,std::vector< meep::sourcedata >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_near_src_data_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  std::vector< meep::sourcedata >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "near_src_data_push_back", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data_push_back" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__sourcedata,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "near_src_data_push_back" "', argument " "2"" of type '" "std::vector< meep::sourcedata >::value_type const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "near_src_data_push_back" "', argument " "2"" of type '" "std::vector< meep::sourcedata >::value_type const &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< meep::sourcedata >::value_type * >(argp2);
  {
    try {
      (arg1)->push_back((std::vector< meep::sourcedata >::value_type const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::sourcedata >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "near_src_data_front", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data_front" "', argument " "1"" of type '" "std::vector< meep::sourcedata > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  {
    try {
      result = (std::vector< meep::sourcedata >::value_type *) &((std::vector< meep::sourcedata > const *)arg1)->front();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__sourcedata, 0 |  0 );
  (void)swig::container_owner<swig::traits<std::vector< meep::sourcedata >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::sourcedata >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "near_src_data_back", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data_back" "', argument " "1"" of type '" "std::vector< meep::sourcedata > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  {
    try {
      result = (std::vector< meep::sourcedata >::value_type *) &((std::vector< meep::sourcedata > const *)arg1)->back();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__sourcedata, 0 |  0 );
  (void)swig::container_owner<swig::traits<std::vector< meep::sourcedata >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  std::vector< meep::sourcedata >::size_type arg2 ;
  std::vector< meep::sourcedata >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "near_src_data_assign", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data_assign" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "near_src_data_assign" "', argument " "2"" of type '" "std::vector< meep::sourcedata >::size_type""'");
  } 
  arg2 = static_cast< std::vector< meep::sourcedata >::size_type >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__sourcedata,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "near_src_data_assign" "', argument " "3"" of type '" "std::vector< meep::sourcedata >::value_type const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "near_src_data_assign" "', argument " "3"" of type '" "std::vector< meep::sourcedata >::value_type const &""'"); 
  }
  arg3 = reinterpret_cast< std::vector< meep::sourcedata >::value_type * >(argp3);
  {
    try {
      (arg1)->assign(arg2,(std::vector< meep::sourcedata >::value_type const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  std::vector< meep::sourcedata >::size_type arg2 ;
  std::vector< meep::sourcedata >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "near_src_data_resize", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data_resize" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "near_src_data_resize" "', argument " "2"" of type '" "std::vector< meep::sourcedata >::size_type""'");
  } 
  arg2 = static_cast< std::vector< meep::sourcedata >::size_type >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__sourcedata,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "near_src_data_resize" "', argument " "3"" of type '" "std::vector< meep::sourcedata >::value_type const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "near_src_data_resize" "', argument " "3"" of type '" "std::vector< meep::sourcedata >::value_type const &""'"); 
  }
  arg3 = reinterpret_cast< std::vector< meep::sourcedata >::value_type * >(argp3);
  {
    try {
      (arg1)->resize(arg2,(std::vector< meep::sourcedata >::value_type const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data_resize(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_near_src_data_resize__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__sourcedata, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_near_src_data_resize__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'near_src_data_resize'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep::sourcedata >::resize(std::vector< meep::sourcedata >::size_type)\n"
    "    std::vector< meep::sourcedata >::resize(std::vector< meep::sourcedata >::size_type,std::vector< meep::sourcedata >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_near_src_data_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  std::vector< meep::sourcedata >::iterator arg2 ;
  std::vector< meep::sourcedata >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< meep::sourcedata >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "near_src_data_insert", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data_insert" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "near_src_data_insert" "', argument " "2"" of type '" "std::vector< meep::sourcedata >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< meep::sourcedata >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::sourcedata >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "near_src_data_insert" "', argument " "2"" of type '" "std::vector< meep::sourcedata >::iterator""'");
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__sourcedata,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "near_src_data_insert" "', argument " "3"" of type '" "std::vector< meep::sourcedata >::value_type const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "near_src_data_insert" "', argument " "3"" of type '" "std::vector< meep::sourcedata >::value_type const &""'"); 
  }
  arg3 = reinterpret_cast< std::vector< meep::sourcedata >::value_type * >(argp3);
  {
    try {
      result = std_vector_Sl_meep_sourcedata_Sg__insert__SWIG_0(arg1,arg2,(meep::sourcedata const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< meep::sourcedata >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  std::vector< meep::sourcedata >::iterator arg2 ;
  std::vector< meep::sourcedata >::size_type arg3 ;
  std::vector< meep::sourcedata >::value_type *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  size_t val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "near_src_data_insert", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data_insert" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "near_src_data_insert" "', argument " "2"" of type '" "std::vector< meep::sourcedata >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< meep::sourcedata >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::sourcedata >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "near_src_data_insert" "', argument " "2"" of type '" "std::vector< meep::sourcedata >::iterator""'");
    }
  }
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "near_src_data_insert" "', argument " "3"" of type '" "std::vector< meep::sourcedata >::size_type""'");
  } 
  arg3 = static_cast< std::vector< meep::sourcedata >::size_type >(val3);
  res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__sourcedata,  0  | 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "near_src_data_insert" "', argument " "4"" of type '" "std::vector< meep::sourcedata >::value_type const &""'"); 
  }
  if (!argp4) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "near_src_data_insert" "', argument " "4"" of type '" "std::vector< meep::sourcedata >::value_type const &""'"); 
  }
  arg4 = reinterpret_cast< std::vector< meep::sourcedata >::value_type * >(argp4);
  {
    try {
      std_vector_Sl_meep_sourcedata_Sg__insert__SWIG_1(arg1,arg2,arg3,(meep::sourcedata const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data_insert(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::sourcedata >::iterator > *>(iter) != 0));
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__sourcedata, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_near_src_data_insert__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< meep::sourcedata,std::allocator< meep::sourcedata > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< meep::sourcedata >::iterator > *>(iter) != 0));
      if (_v) {
        {
          int res = SWIG_AsVal_size_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__sourcedata, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_near_src_data_insert__SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'near_src_data_insert'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< meep::sourcedata >::insert(std::vector< meep::sourcedata >::iterator,std::vector< meep::sourcedata >::value_type const &)\n"
    "    std::vector< meep::sourcedata >::insert(std::vector< meep::sourcedata >::iterator,std::vector< meep::sourcedata >::size_type,std::vector< meep::sourcedata >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_near_src_data_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  std::vector< meep::sourcedata >::size_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "near_src_data_reserve", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data_reserve" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "near_src_data_reserve" "', argument " "2"" of type '" "std::vector< meep::sourcedata >::size_type""'");
  } 
  arg2 = static_cast< std::vector< meep::sourcedata >::size_type >(val2);
  {
    try {
      (arg1)->reserve(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_near_src_data_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< meep::sourcedata >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "near_src_data_capacity", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "near_src_data_capacity" "', argument " "1"" of type '" "std::vector< meep::sourcedata > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  {
    try {
      result = ((std::vector< meep::sourcedata > const *)arg1)->capacity();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_near_src_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< meep::sourcedata > *arg1 = (std::vector< meep::sourcedata > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_near_src_data", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_near_src_data" "', argument " "1"" of type '" "std::vector< meep::sourcedata > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< meep::sourcedata > * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *near_src_data_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *near_src_data_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_ComplexVector_iterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  PyObject **arg2 = (PyObject **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  arg2 = &obj0;
  if (!PyArg_UnpackTuple(args, "ComplexVector_iterator", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector_iterator" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  {
    try {
      result = (swig::SwigPyIterator *)std_vector_Sl_std_complex_Sl_double_Sg__Sg__iterator(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector___nonzero__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector___nonzero__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector___nonzero__" "', argument " "1"" of type '" "std::vector< std::complex< double > > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  {
    try {
      result = (bool)std_vector_Sl_std_complex_Sl_double_Sg__Sg____nonzero__((std::vector< std::complex< double > > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector___bool__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector___bool__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector___bool__" "', argument " "1"" of type '" "std::vector< std::complex< double > > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  {
    try {
      result = (bool)std_vector_Sl_std_complex_Sl_double_Sg__Sg____bool__((std::vector< std::complex< double > > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector___len__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< std::complex< double > >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector___len__", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector___len__" "', argument " "1"" of type '" "std::vector< std::complex< double > > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  {
    try {
      result = std_vector_Sl_std_complex_Sl_double_Sg__Sg____len__((std::vector< std::complex< double > > const *)arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector___getslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  std::vector< std::complex< double > >::difference_type arg2 ;
  std::vector< std::complex< double > >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< std::complex< double >,std::allocator< std::complex< double > > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector___getslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector___getslice__" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ComplexVector___getslice__" "', argument " "2"" of type '" "std::vector< std::complex< double > >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< std::complex< double > >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ComplexVector___getslice__" "', argument " "3"" of type '" "std::vector< std::complex< double > >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< std::complex< double > >::difference_type >(val3);
  {
    try {
      try {
        result = (std::vector< std::complex< double >,std::allocator< std::complex< double > > > *)std_vector_Sl_std_complex_Sl_double_Sg__Sg____getslice__(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector___setslice____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  std::vector< std::complex< double > >::difference_type arg2 ;
  std::vector< std::complex< double > >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector___setslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector___setslice__" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ComplexVector___setslice__" "', argument " "2"" of type '" "std::vector< std::complex< double > >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< std::complex< double > >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ComplexVector___setslice__" "', argument " "3"" of type '" "std::vector< std::complex< double > >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< std::complex< double > >::difference_type >(val3);
  {
    try {
      try {
        std_vector_Sl_std_complex_Sl_double_Sg__Sg____setslice____SWIG_0(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector___setslice____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  std::vector< std::complex< double > >::difference_type arg2 ;
  std::vector< std::complex< double > >::difference_type arg3 ;
  std::vector< std::complex< double >,std::allocator< std::complex< double > > > *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  int res4 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector___setslice__", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector___setslice__" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ComplexVector___setslice__" "', argument " "2"" of type '" "std::vector< std::complex< double > >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< std::complex< double > >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ComplexVector___setslice__" "', argument " "3"" of type '" "std::vector< std::complex< double > >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< std::complex< double > >::difference_type >(val3);
  {
    std::vector< std::complex< double >,std::allocator< std::complex< double > > > *ptr = (std::vector< std::complex< double >,std::allocator< std::complex< double > > > *)0;
    res4 = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ComplexVector___setslice__" "', argument " "4"" of type '" "std::vector< std::complex< double >,std::allocator< std::complex< double > > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ComplexVector___setslice__" "', argument " "4"" of type '" "std::vector< std::complex< double >,std::allocator< std::complex< double > > > const &""'"); 
    }
    arg4 = ptr;
  }
  {
    try {
      try {
        std_vector_Sl_std_complex_Sl_double_Sg__Sg____setslice____SWIG_1(arg1,arg2,arg3,(std::vector< std::complex< double >,std::allocator< std::complex< double > > > const &)*arg4);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector___setslice__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::complex< double >,std::allocator< std::complex< double > > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_ComplexVector___setslice____SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::complex< double >,std::allocator< std::complex< double > > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_ptrdiff_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = swig::asptr(argv[3], (std::vector< std::complex< double >,std::allocator< std::complex< double > > >**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_ComplexVector___setslice____SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'ComplexVector___setslice__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< std::complex< double > >::__setslice__(std::vector< std::complex< double > >::difference_type,std::vector< std::complex< double > >::difference_type)\n"
    "    std::vector< std::complex< double > >::__setslice__(std::vector< std::complex< double > >::difference_type,std::vector< std::complex< double > >::difference_type,std::vector< std::complex< double >,std::allocator< std::complex< double > > > const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_ComplexVector___delslice__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  std::vector< std::complex< double > >::difference_type arg2 ;
  std::vector< std::complex< double > >::difference_type arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  ptrdiff_t val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector___delslice__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector___delslice__" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ComplexVector___delslice__" "', argument " "2"" of type '" "std::vector< std::complex< double > >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< std::complex< double > >::difference_type >(val2);
  ecode3 = SWIG_AsVal_ptrdiff_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ComplexVector___delslice__" "', argument " "3"" of type '" "std::vector< std::complex< double > >::difference_type""'");
  } 
  arg3 = static_cast< std::vector< std::complex< double > >::difference_type >(val3);
  {
    try {
      try {
        std_vector_Sl_std_complex_Sl_double_Sg__Sg____delslice__(arg1,arg2,arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector___delitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  std::vector< std::complex< double > >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector___delitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector___delitem__" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ComplexVector___delitem__" "', argument " "2"" of type '" "std::vector< std::complex< double > >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< std::complex< double > >::difference_type >(val2);
  {
    try {
      try {
        std_vector_Sl_std_complex_Sl_double_Sg__Sg____delitem____SWIG_0(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector___getitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< std::complex< double >,std::allocator< std::complex< double > > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector___getitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector___getitem__" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ComplexVector___getitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        result = (std::vector< std::complex< double >,std::allocator< std::complex< double > > > *)std_vector_Sl_std_complex_Sl_double_Sg__Sg____getitem____SWIG_0(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector___setitem____SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  std::vector< std::complex< double >,std::allocator< std::complex< double > > > *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res3 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector___setitem__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector___setitem__" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ComplexVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    std::vector< std::complex< double >,std::allocator< std::complex< double > > > *ptr = (std::vector< std::complex< double >,std::allocator< std::complex< double > > > *)0;
    res3 = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ComplexVector___setitem__" "', argument " "3"" of type '" "std::vector< std::complex< double >,std::allocator< std::complex< double > > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ComplexVector___setitem__" "', argument " "3"" of type '" "std::vector< std::complex< double >,std::allocator< std::complex< double > > > const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      try {
        std_vector_Sl_std_complex_Sl_double_Sg__Sg____setitem____SWIG_0(arg1,arg2,(std::vector< std::complex< double >,std::allocator< std::complex< double > > > const &)*arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector___setitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector___setitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector___setitem__" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ComplexVector___setitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        std_vector_Sl_std_complex_Sl_double_Sg__Sg____setitem____SWIG_1(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector___delitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  PySliceObject *arg2 = (PySliceObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector___delitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector___delitem__" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  {
    if (!PySlice_Check(obj1)) {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ComplexVector___delitem__" "', argument " "2"" of type '" "PySliceObject *""'");
    }
    arg2 = (PySliceObject *) obj1;
  }
  {
    try {
      try {
        std_vector_Sl_std_complex_Sl_double_Sg__Sg____delitem____SWIG_1(arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      } catch(std::invalid_argument &_e) {
        SWIG_exception_fail(SWIG_ValueError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector___delitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::complex< double >,std::allocator< std::complex< double > > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_ComplexVector___delitem____SWIG_1(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::complex< double >,std::allocator< std::complex< double > > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_ComplexVector___delitem____SWIG_0(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'ComplexVector___delitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< std::complex< double > >::__delitem__(std::vector< std::complex< double > >::difference_type)\n"
    "    std::vector< std::complex< double > >::__delitem__(PySliceObject *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_ComplexVector___getitem____SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  std::vector< std::complex< double > >::difference_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< std::complex< double > >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector___getitem__", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector___getitem__" "', argument " "1"" of type '" "std::vector< std::complex< double > > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ComplexVector___getitem__" "', argument " "2"" of type '" "std::vector< std::complex< double > >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< std::complex< double > >::difference_type >(val2);
  {
    try {
      try {
        result = (std::vector< std::complex< double > >::value_type *) &std_vector_Sl_std_complex_Sl_double_Sg__Sg____getitem____SWIG_1((std::vector< std::complex< double > > const *)arg1,arg2);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(*result));
  (void)swig::container_owner<swig::traits<std::vector< std::complex< double > >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector___getitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::complex< double >,std::allocator< std::complex< double > > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_ComplexVector___getitem____SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::complex< double >,std::allocator< std::complex< double > > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_ComplexVector___getitem____SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'ComplexVector___getitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< std::complex< double > >::__getitem__(PySliceObject *)\n"
    "    std::vector< std::complex< double > >::__getitem__(std::vector< std::complex< double > >::difference_type) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_ComplexVector___setitem____SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  std::vector< std::complex< double > >::difference_type arg2 ;
  std::vector< std::complex< double > >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  std::vector< std::complex< double > >::value_type temp3 ;
  std::complex< double > val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector___setitem__", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector___setitem__" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ComplexVector___setitem__" "', argument " "2"" of type '" "std::vector< std::complex< double > >::difference_type""'");
  } 
  arg2 = static_cast< std::vector< std::complex< double > >::difference_type >(val2);
  ecode3 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ComplexVector___setitem__" "', argument " "3"" of type '" "std::vector< std::complex< double > >::value_type""'");
  } 
  temp3 = static_cast< std::vector< std::complex< double > >::value_type >(val3);
  arg3 = &temp3;
  {
    try {
      try {
        std_vector_Sl_std_complex_Sl_double_Sg__Sg____setitem____SWIG_2(arg1,arg2,(std::complex< double > const &)*arg3);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector___setitem__(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::complex< double >,std::allocator< std::complex< double > > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        return _wrap_ComplexVector___setitem____SWIG_1(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::complex< double >,std::allocator< std::complex< double > > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        _v = PySlice_Check(argv[1]);
      }
      if (_v) {
        int res = swig::asptr(argv[2], (std::vector< std::complex< double >,std::allocator< std::complex< double > > >**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_ComplexVector___setitem____SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::complex< double >,std::allocator< std::complex< double > > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_ptrdiff_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_ComplexVector___setitem____SWIG_2(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'ComplexVector___setitem__'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< std::complex< double > >::__setitem__(PySliceObject *,std::vector< std::complex< double >,std::allocator< std::complex< double > > > const &)\n"
    "    std::vector< std::complex< double > >::__setitem__(PySliceObject *)\n"
    "    std::vector< std::complex< double > >::__setitem__(std::vector< std::complex< double > >::difference_type,std::vector< std::complex< double > >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_ComplexVector_pop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< std::complex< double > >::value_type result;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector_pop", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector_pop" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  {
    try {
      try {
        result = std_vector_Sl_std_complex_Sl_double_Sg__Sg__pop(arg1);
      } catch(std::out_of_range &_e) {
        SWIG_exception_fail(SWIG_IndexError, (&_e)->what());
      }
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  std::vector< std::complex< double > >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< std::complex< double > >::value_type temp2 ;
  std::complex< double > val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector_append", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector_append" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ComplexVector_append" "', argument " "2"" of type '" "std::vector< std::complex< double > >::value_type""'");
  } 
  temp2 = static_cast< std::vector< std::complex< double > >::value_type >(val2);
  arg2 = &temp2;
  {
    try {
      std_vector_Sl_std_complex_Sl_double_Sg__Sg__append(arg1,(std::complex< double > const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_ComplexVector__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_ComplexVector", 0, 0)) SWIG_fail;
  {
    try {
      result = (std::vector< std::complex< double > > *)new std::vector< std::complex< double > >();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_ComplexVector__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  PyObject * obj0 = 0 ;
  std::vector< std::complex< double > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_ComplexVector", 1, 1, &obj0)) SWIG_fail;
  {
    std::vector< std::complex< double >,std::allocator< std::complex< double > > > *ptr = (std::vector< std::complex< double >,std::allocator< std::complex< double > > > *)0;
    res1 = swig::asptr(obj0, &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ComplexVector" "', argument " "1"" of type '" "std::vector< std::complex< double > > const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ComplexVector" "', argument " "1"" of type '" "std::vector< std::complex< double > > const &""'"); 
    }
    arg1 = ptr;
  }
  {
    try {
      result = (std::vector< std::complex< double > > *)new std::vector< std::complex< double > >((std::vector< std::complex< double > > const &)*arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector_empty", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector_empty" "', argument " "1"" of type '" "std::vector< std::complex< double > > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  {
    try {
      result = (bool)((std::vector< std::complex< double > > const *)arg1)->empty();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< std::complex< double > >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector_size", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector_size" "', argument " "1"" of type '" "std::vector< std::complex< double > > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  {
    try {
      result = ((std::vector< std::complex< double > > const *)arg1)->size();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  std::vector< std::complex< double > > *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector_swap", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector_swap" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ComplexVector_swap" "', argument " "2"" of type '" "std::vector< std::complex< double > > &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ComplexVector_swap" "', argument " "2"" of type '" "std::vector< std::complex< double > > &""'"); 
  }
  arg2 = reinterpret_cast< std::vector< std::complex< double > > * >(argp2);
  {
    try {
      (arg1)->swap(*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< std::complex< double > >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector_begin", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector_begin" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  {
    try {
      result = (arg1)->begin();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::complex< double > >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< std::complex< double > >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector_end", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector_end" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  {
    try {
      result = (arg1)->end();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::complex< double > >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector_rbegin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< std::complex< double > >::reverse_iterator result;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector_rbegin", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector_rbegin" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  {
    try {
      result = (arg1)->rbegin();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::complex< double > >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector_rend(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< std::complex< double > >::reverse_iterator result;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector_rend", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector_rend" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  {
    try {
      result = (arg1)->rend();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::complex< double > >::reverse_iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector_clear", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector_clear" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  {
    try {
      (arg1)->clear();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector_get_allocator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  SwigValueWrapper< std::allocator< std::complex< double > > > result;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector_get_allocator", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector_get_allocator" "', argument " "1"" of type '" "std::vector< std::complex< double > > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  {
    try {
      result = ((std::vector< std::complex< double > > const *)arg1)->get_allocator();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new std::vector< std::complex< double > >::allocator_type(static_cast< const std::vector< std::complex< double > >::allocator_type& >(result))), SWIGTYPE_p_std__allocatorT_std__complexT_double_t_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_ComplexVector__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > >::size_type arg1 ;
  size_t val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< std::complex< double > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_ComplexVector", 1, 1, &obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ComplexVector" "', argument " "1"" of type '" "std::vector< std::complex< double > >::size_type""'");
  } 
  arg1 = static_cast< std::vector< std::complex< double > >::size_type >(val1);
  {
    try {
      result = (std::vector< std::complex< double > > *)new std::vector< std::complex< double > >(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector_pop_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector_pop_back", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector_pop_back" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  {
    try {
      (arg1)->pop_back();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector_resize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  std::vector< std::complex< double > >::size_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector_resize", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector_resize" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ComplexVector_resize" "', argument " "2"" of type '" "std::vector< std::complex< double > >::size_type""'");
  } 
  arg2 = static_cast< std::vector< std::complex< double > >::size_type >(val2);
  {
    try {
      (arg1)->resize(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector_erase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  std::vector< std::complex< double > >::iterator arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< std::complex< double > >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector_erase", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector_erase" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ComplexVector_erase" "', argument " "2"" of type '" "std::vector< std::complex< double > >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< std::complex< double > >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< std::complex< double > >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ComplexVector_erase" "', argument " "2"" of type '" "std::vector< std::complex< double > >::iterator""'");
    }
  }
  {
    try {
      result = std_vector_Sl_std_complex_Sl_double_Sg__Sg__erase__SWIG_0(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::complex< double > >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector_erase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  std::vector< std::complex< double > >::iterator arg2 ;
  std::vector< std::complex< double > >::iterator arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  swig::SwigPyIterator *iter3 = 0 ;
  int res3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< std::complex< double > >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector_erase", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector_erase" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ComplexVector_erase" "', argument " "2"" of type '" "std::vector< std::complex< double > >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< std::complex< double > >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< std::complex< double > >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ComplexVector_erase" "', argument " "2"" of type '" "std::vector< std::complex< double > >::iterator""'");
    }
  }
  res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&iter3), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res3) || !iter3) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ComplexVector_erase" "', argument " "3"" of type '" "std::vector< std::complex< double > >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< std::complex< double > >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< std::complex< double > >::iterator > *>(iter3);
    if (iter_t) {
      arg3 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ComplexVector_erase" "', argument " "3"" of type '" "std::vector< std::complex< double > >::iterator""'");
    }
  }
  {
    try {
      result = std_vector_Sl_std_complex_Sl_double_Sg__Sg__erase__SWIG_1(arg1,arg2,arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::complex< double > >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector_erase(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::complex< double >,std::allocator< std::complex< double > > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< std::complex< double > >::iterator > *>(iter) != 0));
      if (_v) {
        return _wrap_ComplexVector_erase__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::complex< double >,std::allocator< std::complex< double > > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< std::complex< double > >::iterator > *>(iter) != 0));
      if (_v) {
        swig::SwigPyIterator *iter = 0;
        int res = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
        _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< std::complex< double > >::iterator > *>(iter) != 0));
        if (_v) {
          return _wrap_ComplexVector_erase__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'ComplexVector_erase'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< std::complex< double > >::erase(std::vector< std::complex< double > >::iterator)\n"
    "    std::vector< std::complex< double > >::erase(std::vector< std::complex< double > >::iterator,std::vector< std::complex< double > >::iterator)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_new_ComplexVector__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > >::size_type arg1 ;
  std::vector< std::complex< double > >::value_type *arg2 = 0 ;
  size_t val1 ;
  int ecode1 = 0 ;
  std::vector< std::complex< double > >::value_type temp2 ;
  std::complex< double > val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  std::vector< std::complex< double > > *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_ComplexVector", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_size_t(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ComplexVector" "', argument " "1"" of type '" "std::vector< std::complex< double > >::size_type""'");
  } 
  arg1 = static_cast< std::vector< std::complex< double > >::size_type >(val1);
  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ComplexVector" "', argument " "2"" of type '" "std::vector< std::complex< double > >::value_type""'");
  } 
  temp2 = static_cast< std::vector< std::complex< double > >::value_type >(val2);
  arg2 = &temp2;
  {
    try {
      result = (std::vector< std::complex< double > > *)new std::vector< std::complex< double > >(arg1,(std::vector< std::complex< double > >::value_type const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_ComplexVector(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 0) {
    return _wrap_new_ComplexVector__SWIG_0(self, args);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_ComplexVector__SWIG_2(self, args);
    }
  }
  if (argc == 1) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::complex< double >,std::allocator< std::complex< double > > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_ComplexVector__SWIG_1(self, args);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_size_t(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_ComplexVector__SWIG_3(self, args);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_ComplexVector'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< std::complex< double > >::vector()\n"
    "    std::vector< std::complex< double > >::vector(std::vector< std::complex< double > > const &)\n"
    "    std::vector< std::complex< double > >::vector(std::vector< std::complex< double > >::size_type)\n"
    "    std::vector< std::complex< double > >::vector(std::vector< std::complex< double > >::size_type,std::vector< std::complex< double > >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_ComplexVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  std::vector< std::complex< double > >::value_type *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::vector< std::complex< double > >::value_type temp2 ;
  std::complex< double > val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector_push_back", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector_push_back" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  ecode2 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ComplexVector_push_back" "', argument " "2"" of type '" "std::vector< std::complex< double > >::value_type""'");
  } 
  temp2 = static_cast< std::vector< std::complex< double > >::value_type >(val2);
  arg2 = &temp2;
  {
    try {
      (arg1)->push_back((std::vector< std::complex< double > >::value_type const &)*arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector_front(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< std::complex< double > >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector_front", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector_front" "', argument " "1"" of type '" "std::vector< std::complex< double > > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  {
    try {
      result = (std::vector< std::complex< double > >::value_type *) &((std::vector< std::complex< double > > const *)arg1)->front();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(*result));
  (void)swig::container_owner<swig::traits<std::vector< std::complex< double > >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< std::complex< double > >::value_type *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector_back", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector_back" "', argument " "1"" of type '" "std::vector< std::complex< double > > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  {
    try {
      result = (std::vector< std::complex< double > >::value_type *) &((std::vector< std::complex< double > > const *)arg1)->back();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_complex_Sl_double_Sg_(static_cast< std::complex<double> >(*result));
  (void)swig::container_owner<swig::traits<std::vector< std::complex< double > >::value_type>::category>::back_reference(resultobj, obj0);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  std::vector< std::complex< double > >::size_type arg2 ;
  std::vector< std::complex< double > >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  std::vector< std::complex< double > >::value_type temp3 ;
  std::complex< double > val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector_assign", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector_assign" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ComplexVector_assign" "', argument " "2"" of type '" "std::vector< std::complex< double > >::size_type""'");
  } 
  arg2 = static_cast< std::vector< std::complex< double > >::size_type >(val2);
  ecode3 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ComplexVector_assign" "', argument " "3"" of type '" "std::vector< std::complex< double > >::value_type""'");
  } 
  temp3 = static_cast< std::vector< std::complex< double > >::value_type >(val3);
  arg3 = &temp3;
  {
    try {
      (arg1)->assign(arg2,(std::vector< std::complex< double > >::value_type const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector_resize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  std::vector< std::complex< double > >::size_type arg2 ;
  std::vector< std::complex< double > >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  std::vector< std::complex< double > >::value_type temp3 ;
  std::complex< double > val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector_resize", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector_resize" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ComplexVector_resize" "', argument " "2"" of type '" "std::vector< std::complex< double > >::size_type""'");
  } 
  arg2 = static_cast< std::vector< std::complex< double > >::size_type >(val2);
  ecode3 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ComplexVector_resize" "', argument " "3"" of type '" "std::vector< std::complex< double > >::value_type""'");
  } 
  temp3 = static_cast< std::vector< std::complex< double > >::value_type >(val3);
  arg3 = &temp3;
  {
    try {
      (arg1)->resize(arg2,(std::vector< std::complex< double > >::value_type const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector_resize(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::complex< double >,std::allocator< std::complex< double > > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_ComplexVector_resize__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::complex< double >,std::allocator< std::complex< double > > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_size_t(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_ComplexVector_resize__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'ComplexVector_resize'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< std::complex< double > >::resize(std::vector< std::complex< double > >::size_type)\n"
    "    std::vector< std::complex< double > >::resize(std::vector< std::complex< double > >::size_type,std::vector< std::complex< double > >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_ComplexVector_insert__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  std::vector< std::complex< double > >::iterator arg2 ;
  std::vector< std::complex< double > >::value_type *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  std::vector< std::complex< double > >::value_type temp3 ;
  std::complex< double > val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  std::vector< std::complex< double > >::iterator result;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector_insert", 3, 3, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector_insert" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ComplexVector_insert" "', argument " "2"" of type '" "std::vector< std::complex< double > >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< std::complex< double > >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< std::complex< double > >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ComplexVector_insert" "', argument " "2"" of type '" "std::vector< std::complex< double > >::iterator""'");
    }
  }
  ecode3 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ComplexVector_insert" "', argument " "3"" of type '" "std::vector< std::complex< double > >::value_type""'");
  } 
  temp3 = static_cast< std::vector< std::complex< double > >::value_type >(val3);
  arg3 = &temp3;
  {
    try {
      result = std_vector_Sl_std_complex_Sl_double_Sg__Sg__insert__SWIG_0(arg1,arg2,(std::complex< double > const &)*arg3);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(swig::make_output_iterator(static_cast< const std::vector< std::complex< double > >::iterator & >(result)),
    swig::SwigPyIterator::descriptor(),SWIG_POINTER_OWN);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector_insert__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  std::vector< std::complex< double > >::iterator arg2 ;
  std::vector< std::complex< double > >::size_type arg3 ;
  std::vector< std::complex< double > >::value_type *arg4 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *iter2 = 0 ;
  int res2 ;
  size_t val3 ;
  int ecode3 = 0 ;
  std::vector< std::complex< double > >::value_type temp4 ;
  std::complex< double > val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector_insert", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector_insert" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&iter2), swig::SwigPyIterator::descriptor(), 0);
  if (!SWIG_IsOK(res2) || !iter2) {
    SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ComplexVector_insert" "', argument " "2"" of type '" "std::vector< std::complex< double > >::iterator""'");
  } else {
    swig::SwigPyIterator_T<std::vector< std::complex< double > >::iterator > *iter_t = dynamic_cast<swig::SwigPyIterator_T<std::vector< std::complex< double > >::iterator > *>(iter2);
    if (iter_t) {
      arg2 = iter_t->get_current();
    } else {
      SWIG_exception_fail(SWIG_ArgError(SWIG_TypeError), "in method '" "ComplexVector_insert" "', argument " "2"" of type '" "std::vector< std::complex< double > >::iterator""'");
    }
  }
  ecode3 = SWIG_AsVal_size_t(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ComplexVector_insert" "', argument " "3"" of type '" "std::vector< std::complex< double > >::size_type""'");
  } 
  arg3 = static_cast< std::vector< std::complex< double > >::size_type >(val3);
  ecode4 = SWIG_AsVal_std_complex_Sl_double_Sg_(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ComplexVector_insert" "', argument " "4"" of type '" "std::vector< std::complex< double > >::value_type""'");
  } 
  temp4 = static_cast< std::vector< std::complex< double > >::value_type >(val4);
  arg4 = &temp4;
  {
    try {
      std_vector_Sl_std_complex_Sl_double_Sg__Sg__insert__SWIG_1(arg1,arg2,arg3,(std::complex< double > const &)*arg4);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector_insert(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[5] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 4) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::complex< double >,std::allocator< std::complex< double > > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< std::complex< double > >::iterator > *>(iter) != 0));
      if (_v) {
        {
          int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_ComplexVector_insert__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = swig::asptr(argv[0], (std::vector< std::complex< double >,std::allocator< std::complex< double > > >**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      swig::SwigPyIterator *iter = 0;
      int res = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&iter), swig::SwigPyIterator::descriptor(), 0);
      _v = (SWIG_IsOK(res) && iter && (dynamic_cast<swig::SwigPyIterator_T<std::vector< std::complex< double > >::iterator > *>(iter) != 0));
      if (_v) {
        {
          int res = SWIG_AsVal_size_t(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_std_complex_Sl_double_Sg_(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_ComplexVector_insert__SWIG_1(self, args);
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'ComplexVector_insert'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    std::vector< std::complex< double > >::insert(std::vector< std::complex< double > >::iterator,std::vector< std::complex< double > >::value_type const &)\n"
    "    std::vector< std::complex< double > >::insert(std::vector< std::complex< double > >::iterator,std::vector< std::complex< double > >::size_type,std::vector< std::complex< double > >::value_type const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_ComplexVector_reserve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  std::vector< std::complex< double > >::size_type arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector_reserve", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector_reserve" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  ecode2 = SWIG_AsVal_size_t(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ComplexVector_reserve" "', argument " "2"" of type '" "std::vector< std::complex< double > >::size_type""'");
  } 
  arg2 = static_cast< std::vector< std::complex< double > >::size_type >(val2);
  {
    try {
      (arg1)->reserve(arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ComplexVector_capacity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  std::vector< std::complex< double > >::size_type result;
  
  if (!PyArg_UnpackTuple(args, "ComplexVector_capacity", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ComplexVector_capacity" "', argument " "1"" of type '" "std::vector< std::complex< double > > const *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  {
    try {
      result = ((std::vector< std::complex< double > > const *)arg1)->capacity();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_ComplexVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::vector< std::complex< double > > *arg1 = (std::vector< std::complex< double > > *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_ComplexVector", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ComplexVector" "', argument " "1"" of type '" "std::vector< std::complex< double > > *""'"); 
  }
  arg1 = reinterpret_cast< std::vector< std::complex< double > > * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *ComplexVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *ComplexVector_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_vector3_x_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  vector3 *arg1 = (vector3 *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "vector3_x_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vector3, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector3_x_set" "', argument " "1"" of type '" "vector3 *""'"); 
  }
  arg1 = reinterpret_cast< vector3 * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector3_x_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->x = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vector3_x_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  vector3 *arg1 = (vector3 *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "vector3_x_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vector3, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector3_x_get" "', argument " "1"" of type '" "vector3 *""'"); 
  }
  arg1 = reinterpret_cast< vector3 * >(argp1);
  result = (double) ((arg1)->x);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vector3_y_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  vector3 *arg1 = (vector3 *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "vector3_y_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vector3, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector3_y_set" "', argument " "1"" of type '" "vector3 *""'"); 
  }
  arg1 = reinterpret_cast< vector3 * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector3_y_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->y = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vector3_y_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  vector3 *arg1 = (vector3 *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "vector3_y_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vector3, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector3_y_get" "', argument " "1"" of type '" "vector3 *""'"); 
  }
  arg1 = reinterpret_cast< vector3 * >(argp1);
  result = (double) ((arg1)->y);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vector3_z_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  vector3 *arg1 = (vector3 *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "vector3_z_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vector3, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector3_z_set" "', argument " "1"" of type '" "vector3 *""'"); 
  }
  arg1 = reinterpret_cast< vector3 * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vector3_z_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->z = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_vector3_z_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  vector3 *arg1 = (vector3 *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "vector3_z_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vector3, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector3_z_get" "', argument " "1"" of type '" "vector3 *""'"); 
  }
  arg1 = reinterpret_cast< vector3 * >(argp1);
  result = (double) ((arg1)->z);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_vector3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  vector3 *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_vector3", 0, 0)) SWIG_fail;
  {
    try {
      result = (vector3 *)new vector3();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vector3, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_vector3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  vector3 *arg1 = (vector3 *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_vector3", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_vector3, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_vector3" "', argument " "1"" of type '" "vector3 *""'"); 
  }
  arg1 = reinterpret_cast< vector3 * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *vector3_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_vector3, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *vector3_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_geom_box_low_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  geom_box *arg1 = (geom_box *) 0 ;
  vector3 *arg2 = (vector3 *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "geom_box_low_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_geom_box, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_box_low_set" "', argument " "1"" of type '" "geom_box *""'"); 
  }
  arg1 = reinterpret_cast< geom_box * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_vector3, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "geom_box_low_set" "', argument " "2"" of type '" "vector3 *""'"); 
  }
  arg2 = reinterpret_cast< vector3 * >(argp2);
  if (arg1) (arg1)->low = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_box_low_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  geom_box *arg1 = (geom_box *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  vector3 *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "geom_box_low_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_geom_box, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_box_low_get" "', argument " "1"" of type '" "geom_box *""'"); 
  }
  arg1 = reinterpret_cast< geom_box * >(argp1);
  result = (vector3 *)& ((arg1)->low);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vector3, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_box_high_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  geom_box *arg1 = (geom_box *) 0 ;
  vector3 *arg2 = (vector3 *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "geom_box_high_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_geom_box, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_box_high_set" "', argument " "1"" of type '" "geom_box *""'"); 
  }
  arg1 = reinterpret_cast< geom_box * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_vector3, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "geom_box_high_set" "', argument " "2"" of type '" "vector3 *""'"); 
  }
  arg2 = reinterpret_cast< vector3 * >(argp2);
  if (arg1) (arg1)->high = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_geom_box_high_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  geom_box *arg1 = (geom_box *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  vector3 *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "geom_box_high_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_geom_box, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "geom_box_high_get" "', argument " "1"" of type '" "geom_box *""'"); 
  }
  arg1 = reinterpret_cast< geom_box * >(argp1);
  result = (vector3 *)& ((arg1)->high);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_vector3, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_geom_box(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  geom_box *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_geom_box", 0, 0)) SWIG_fail;
  {
    try {
      result = (geom_box *)new geom_box();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_geom_box, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_geom_box(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  geom_box *arg1 = (geom_box *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_geom_box", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_geom_box, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_geom_box" "', argument " "1"" of type '" "geom_box *""'"); 
  }
  arg1 = reinterpret_cast< geom_box * >(argp1);
  {
    try {
      delete arg1;
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *geom_box_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_geom_box, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *geom_box_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_eigenmode_data_mdata_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  maxwell_data *arg2 = (maxwell_data *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "eigenmode_data_mdata_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eigenmode_data_mdata_set" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_maxwell_data, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "eigenmode_data_mdata_set" "', argument " "2"" of type '" "maxwell_data *""'"); 
  }
  arg2 = reinterpret_cast< maxwell_data * >(argp2);
  if (arg1) (arg1)->mdata = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_eigenmode_data_mdata_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  maxwell_data *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "eigenmode_data_mdata_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eigenmode_data_mdata_get" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  result = (maxwell_data *) ((arg1)->mdata);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_maxwell_data, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_eigenmode_data_fft_data_H_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  scalar_complex *arg2 = (scalar_complex *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "eigenmode_data_fft_data_H_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eigenmode_data_fft_data_H_set" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_scalar_complex, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "eigenmode_data_fft_data_H_set" "', argument " "2"" of type '" "scalar_complex *""'"); 
  }
  arg2 = reinterpret_cast< scalar_complex * >(argp2);
  if (arg1) (arg1)->fft_data_H = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_eigenmode_data_fft_data_H_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  scalar_complex *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "eigenmode_data_fft_data_H_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eigenmode_data_fft_data_H_get" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  result = (scalar_complex *) ((arg1)->fft_data_H);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_scalar_complex, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_eigenmode_data_fft_data_E_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  scalar_complex *arg2 = (scalar_complex *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "eigenmode_data_fft_data_E_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eigenmode_data_fft_data_E_set" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_scalar_complex, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "eigenmode_data_fft_data_E_set" "', argument " "2"" of type '" "scalar_complex *""'"); 
  }
  arg2 = reinterpret_cast< scalar_complex * >(argp2);
  if (arg1) (arg1)->fft_data_E = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_eigenmode_data_fft_data_E_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  scalar_complex *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "eigenmode_data_fft_data_E_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eigenmode_data_fft_data_E_get" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  result = (scalar_complex *) ((arg1)->fft_data_E);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_scalar_complex, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_eigenmode_data_H_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  evectmatrix arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "eigenmode_data_H_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eigenmode_data_H_set" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_evectmatrix,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "eigenmode_data_H_set" "', argument " "2"" of type '" "evectmatrix""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "eigenmode_data_H_set" "', argument " "2"" of type '" "evectmatrix""'");
    } else {
      evectmatrix * temp = reinterpret_cast< evectmatrix * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  if (arg1) (arg1)->H = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_eigenmode_data_H_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  evectmatrix result;
  
  if (!PyArg_UnpackTuple(args, "eigenmode_data_H_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eigenmode_data_H_get" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  result =  ((arg1)->H);
  resultobj = SWIG_NewPointerObj((new evectmatrix(static_cast< const evectmatrix& >(result))), SWIGTYPE_p_evectmatrix, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_eigenmode_data_n_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  int *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyArrayObject *array2 = NULL ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "eigenmode_data_n_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eigenmode_data_n_set" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  {
    npy_intp size[1] = {
      3 
    };
    array2 = obj_to_array_no_conversion(obj1, NPY_INT);
    if (!array2 || !require_dimensions(array2,1) || !require_size(array2, size, 1) ||
      !require_contiguous(array2) || !require_native(array2)) SWIG_fail;
    arg2 = (int *) array_data(array2);
  }
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)3; ++ii) *(int *)&arg1->n[ii] = *((int *)arg2 + ii);
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""n""' of type '""int [3]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_eigenmode_data_n_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "eigenmode_data_n_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eigenmode_data_n_get" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  result = (int *)(int *) ((arg1)->n);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_eigenmode_data_s_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  double *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyArrayObject *array2 = NULL ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "eigenmode_data_s_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eigenmode_data_s_set" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  {
    npy_intp size[1] = {
      3 
    };
    array2 = obj_to_array_no_conversion(obj1, NPY_DOUBLE);
    if (!array2 || !require_dimensions(array2,1) || !require_size(array2, size, 1) ||
      !require_contiguous(array2) || !require_native(array2)) SWIG_fail;
    arg2 = (double *) array_data(array2);
  }
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)3; ++ii) *(double *)&arg1->s[ii] = *((double *)arg2 + ii);
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""s""' of type '""double [3]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_eigenmode_data_s_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "eigenmode_data_s_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eigenmode_data_s_get" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  result = (double *)(double *) ((arg1)->s);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_eigenmode_data_Gk_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  double *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyArrayObject *array2 = NULL ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "eigenmode_data_Gk_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eigenmode_data_Gk_set" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  {
    npy_intp size[1] = {
      3 
    };
    array2 = obj_to_array_no_conversion(obj1, NPY_DOUBLE);
    if (!array2 || !require_dimensions(array2,1) || !require_size(array2, size, 1) ||
      !require_contiguous(array2) || !require_native(array2)) SWIG_fail;
    arg2 = (double *) array_data(array2);
  }
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)3; ++ii) *(double *)&arg1->Gk[ii] = *((double *)arg2 + ii);
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""Gk""' of type '""double [3]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_eigenmode_data_Gk_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "eigenmode_data_Gk_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eigenmode_data_Gk_get" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  result = (double *)(double *) ((arg1)->Gk);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_eigenmode_data_center_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  meep::vec *arg2 = (meep::vec *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "eigenmode_data_center_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eigenmode_data_center_set" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_meep__vec, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "eigenmode_data_center_set" "', argument " "2"" of type '" "meep::vec *""'"); 
  }
  arg2 = reinterpret_cast< meep::vec * >(argp2);
  if (arg1) (arg1)->center = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_eigenmode_data_center_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  meep::vec *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "eigenmode_data_center_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eigenmode_data_center_get" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  result = (meep::vec *)& ((arg1)->center);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__vec, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_eigenmode_data_amp_func_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  amplitude_function arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "eigenmode_data_amp_func_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eigenmode_data_amp_func_set" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_amplitude_function,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "eigenmode_data_amp_func_set" "', argument " "2"" of type '" "amplitude_function""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "eigenmode_data_amp_func_set" "', argument " "2"" of type '" "amplitude_function""'");
    } else {
      amplitude_function * temp = reinterpret_cast< amplitude_function * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  if (arg1) (arg1)->amp_func = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_eigenmode_data_amp_func_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  amplitude_function result;
  
  if (!PyArg_UnpackTuple(args, "eigenmode_data_amp_func_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eigenmode_data_amp_func_get" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  result =  ((arg1)->amp_func);
  resultobj = SWIG_NewPointerObj((new amplitude_function(static_cast< const amplitude_function& >(result))), SWIGTYPE_p_amplitude_function, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_eigenmode_data_band_num_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "eigenmode_data_band_num_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eigenmode_data_band_num_set" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "eigenmode_data_band_num_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  if (arg1) (arg1)->band_num = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_eigenmode_data_band_num_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "eigenmode_data_band_num_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eigenmode_data_band_num_get" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  result = (int) ((arg1)->band_num);
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_eigenmode_data_frequency_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "eigenmode_data_frequency_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eigenmode_data_frequency_set" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "eigenmode_data_frequency_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->frequency = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_eigenmode_data_frequency_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "eigenmode_data_frequency_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eigenmode_data_frequency_get" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  result = (double) ((arg1)->frequency);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_eigenmode_data_group_velocity_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "eigenmode_data_group_velocity_set", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eigenmode_data_group_velocity_set" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "eigenmode_data_group_velocity_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (arg1) (arg1)->group_velocity = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_eigenmode_data_group_velocity_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_UnpackTuple(args, "eigenmode_data_group_velocity_get", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "eigenmode_data_group_velocity_get" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  result = (double) ((arg1)->group_velocity);
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_eigenmode_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "delete_eigenmode_data", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_eigenmode_data" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  {
    try {
      delete_meep_eigenmode_data(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_eigenmode_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "new_eigenmode_data", 0, 0)) SWIG_fail;
  {
    try {
      result = (meep::eigenmode_data *)new meep::eigenmode_data();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__eigenmode_data, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *eigenmode_data_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_meep__eigenmode_data, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *eigenmode_data_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap__get_eigenmode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  double arg2 ;
  meep::direction arg3 ;
  SwigValueWrapper< meep::volume > arg4 ;
  SwigValueWrapper< meep::volume > arg5 ;
  int arg6 ;
  meep::vec *arg7 = 0 ;
  bool arg8 ;
  int arg9 ;
  double arg10 ;
  double arg11 ;
  double *arg12 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  void *argp5 ;
  int res5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  bool val8 ;
  int ecode8 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  double val10 ;
  int ecode10 = 0 ;
  double val11 ;
  int ecode11 = 0 ;
  PyArrayObject *array12 = NULL ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  meep::eigenmode_data *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "_get_eigenmode", 12, 12, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_get_eigenmode" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "_get_eigenmode" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "_get_eigenmode" "', argument " "3"" of type '" "meep::direction""'");
  } 
  arg3 = static_cast< meep::direction >(val3);
  {
    res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__volume,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "_get_eigenmode" "', argument " "4"" of type '" "meep::volume const""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "_get_eigenmode" "', argument " "4"" of type '" "meep::volume const""'");
    } else {
      meep::volume * temp = reinterpret_cast< meep::volume * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  {
    res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__volume,  0  | 0);
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "_get_eigenmode" "', argument " "5"" of type '" "meep::volume const""'"); 
    }  
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "_get_eigenmode" "', argument " "5"" of type '" "meep::volume const""'");
    } else {
      meep::volume * temp = reinterpret_cast< meep::volume * >(argp5);
      arg5 = *temp;
      if (SWIG_IsNewObj(res5)) delete temp;
    }
  }
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "_get_eigenmode" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_meep__vec,  0  | 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "_get_eigenmode" "', argument " "7"" of type '" "meep::vec const &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "_get_eigenmode" "', argument " "7"" of type '" "meep::vec const &""'"); 
  }
  arg7 = reinterpret_cast< meep::vec * >(argp7);
  ecode8 = SWIG_AsVal_bool(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "_get_eigenmode" "', argument " "8"" of type '" "bool""'");
  } 
  arg8 = static_cast< bool >(val8);
  ecode9 = SWIG_AsVal_int(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "_get_eigenmode" "', argument " "9"" of type '" "int""'");
  } 
  arg9 = static_cast< int >(val9);
  ecode10 = SWIG_AsVal_double(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "_get_eigenmode" "', argument " "10"" of type '" "double""'");
  } 
  arg10 = static_cast< double >(val10);
  ecode11 = SWIG_AsVal_double(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "_get_eigenmode" "', argument " "11"" of type '" "double""'");
  } 
  arg11 = static_cast< double >(val11);
  {
    npy_intp size[1] = {
      3 
    };
    array12 = obj_to_array_no_conversion(obj11, NPY_DOUBLE);
    if (!array12 || !require_dimensions(array12,1) || !require_size(array12, size, 1) ||
      !require_contiguous(array12) || !require_native(array12)) SWIG_fail;
    arg12 = (double *) array_data(array12);
  }
  {
    try {
      result = (meep::eigenmode_data *)_get_eigenmode(arg1,arg2,arg3,arg4,arg5,arg6,(meep::vec const &)*arg7,arg8,arg9,arg10,arg11,arg12);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__eigenmode_data, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap__get_eigenmode_Gk(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::eigenmode_data *arg1 = (meep::eigenmode_data *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "_get_eigenmode_Gk", 1, 1, &obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__eigenmode_data, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_get_eigenmode_Gk" "', argument " "1"" of type '" "meep::eigenmode_data *""'"); 
  }
  arg1 = reinterpret_cast< meep::eigenmode_data * >(argp1);
  {
    try {
      result = (PyObject *)_get_eigenmode_Gk(arg1);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_is_point_in_object(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  vector3 arg1 ;
  GEOMETRIC_OBJECT arg2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  boolean result;
  
  {
    (&arg2)->material = NULL;
  }
  if (!PyArg_UnpackTuple(args, "is_point_in_object", 2, 2, &obj0, &obj1)) SWIG_fail;
  {
    if(!pyv3_to_v3(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  {
    if(!py_gobj_to_gobj(obj1, &arg2)) {
      SWIG_fail;
    }
  }
  {
    try {
      result = point_in_objectp(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    resultobj = PyBool_FromLong(result);
  }
  {
    if ((&arg2)->material) {
      material_free((material_data *)(&arg2)->material);
      geometric_object_destroy(arg2);
    }
  }
  return resultobj;
fail:
  {
    if ((&arg2)->material) {
      material_free((material_data *)(&arg2)->material);
      geometric_object_destroy(arg2);
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_is_point_in_periodic_object(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  vector3 arg1 ;
  GEOMETRIC_OBJECT arg2 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  boolean result;
  
  {
    (&arg2)->material = NULL;
  }
  if (!PyArg_UnpackTuple(args, "is_point_in_periodic_object", 2, 2, &obj0, &obj1)) SWIG_fail;
  {
    if(!pyv3_to_v3(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  {
    if(!py_gobj_to_gobj(obj1, &arg2)) {
      SWIG_fail;
    }
  }
  {
    try {
      result = point_in_periodic_objectp(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    resultobj = PyBool_FromLong(result);
  }
  {
    if ((&arg2)->material) {
      material_free((material_data *)(&arg2)->material);
      geometric_object_destroy(arg2);
    }
  }
  return resultobj;
fail:
  {
    if ((&arg2)->material) {
      material_free((material_data *)(&arg2)->material);
      geometric_object_destroy(arg2);
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_display_geometric_object_info(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  GEOMETRIC_OBJECT arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    (&arg2)->material = NULL;
  }
  if (!PyArg_UnpackTuple(args, "display_geometric_object_info", 2, 2, &obj0, &obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "display_geometric_object_info" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    if(!py_gobj_to_gobj(obj1, &arg2)) {
      SWIG_fail;
    }
  }
  {
    try {
      display_geometric_object_info(arg1,arg2);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    if ((&arg2)->material) {
      material_free((material_data *)(&arg2)->material);
      geometric_object_destroy(arg2);
    }
  }
  return resultobj;
fail:
  {
    if ((&arg2)->material) {
      material_free((material_data *)(&arg2)->material);
      geometric_object_destroy(arg2);
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_eigenmode_coefficients_and_kpoints__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  SwigValueWrapper< meep::dft_flux > arg2 ;
  meep::volume *arg3 = 0 ;
  int *arg4 = (int *) 0 ;
  int arg5 ;
  int arg6 ;
  double arg7 ;
  double arg8 ;
  std::complex< double > *arg9 = (std::complex< double > *) 0 ;
  double *arg10 = (double *) 0 ;
  meep::kpoint_func arg11 = (meep::kpoint_func) 0 ;
  void *arg12 = (void *) 0 ;
  double *arg13 = (double *) 0 ;
  meep::direction arg14 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyArrayObject *array4 = NULL ;
  int is_new_object4 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  int val14 ;
  int ecode14 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  kpoint_list result;
  
  if (!PyArg_UnpackTuple(args, "get_eigenmode_coefficients_and_kpoints", 12, 12, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_eigenmode_coefficients_and_kpoints" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_flux,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_eigenmode_coefficients_and_kpoints" "', argument " "2"" of type '" "meep::dft_flux""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "get_eigenmode_coefficients_and_kpoints" "', argument " "2"" of type '" "meep::dft_flux""'");
    } else {
      meep::dft_flux * temp = reinterpret_cast< meep::dft_flux * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "get_eigenmode_coefficients_and_kpoints" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "get_eigenmode_coefficients_and_kpoints" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    npy_intp size[1] = {
      -1 
    };
    array4 = obj_to_array_contiguous_allow_conversion(obj3,
      NPY_INT,
      &is_new_object4);
    if (!array4 || !require_dimensions(array4, 1) ||
      !require_size(array4, size, 1)) SWIG_fail;
    arg4 = (int*) array_data(array4);
    arg5 = (int) array_size(array4,0);
  }
  ecode6 = SWIG_AsVal_int(obj4, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "get_eigenmode_coefficients_and_kpoints" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_double(obj5, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "get_eigenmode_coefficients_and_kpoints" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  ecode8 = SWIG_AsVal_double(obj6, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "get_eigenmode_coefficients_and_kpoints" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  {
    arg9 = (std::complex<double> *)array_data(obj7);
  }
  {
    arg10 = (double *)array_data(obj8);
  }
  {
    if (obj9 == Py_None) {
      arg11 = NULL;
      arg12 = NULL;
    }
    else {
      arg11 = py_kpoint_func_wrap;
      arg12 = (void*)obj9;
    }
  }
  {
    arg13 = (double *)array_data(obj10);
  }
  ecode14 = SWIG_AsVal_int(obj11, &val14);
  if (!SWIG_IsOK(ecode14)) {
    SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "get_eigenmode_coefficients_and_kpoints" "', argument " "14"" of type '" "meep::direction""'");
  } 
  arg14 = static_cast< meep::direction >(val14);
  {
    try {
      result = get_eigenmode_coefficients_and_kpoints(arg1,arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    PyObject *py_kpoints = PyList_New((&result)->n);
    PyObject *py_kdom = PyList_New((&result)->num_bands);
    
    for (size_t i = 0; i < (&result)->n; ++i) {
      PyList_SetItem(py_kpoints, i, vec2py((&result)->kpoints[i], true));
    }
    for (size_t i = 0; i < (&result)->num_bands; ++i) {
      PyList_SetItem(py_kdom, i, vec2py((&result)->kdom[i], true));
    }
    
    resultobj = Py_BuildValue("(O,O)", py_kpoints, py_kdom);
    
    Py_DECREF(py_kpoints);
    Py_DECREF(py_kdom);
    delete[] (&result)->kpoints;
    delete[] (&result)->kdom;
  }
  {
    if (is_new_object4 && array4)
    {
      Py_DECREF(array4); 
    }
  }
  return resultobj;
fail:
  {
    if (is_new_object4 && array4)
    {
      Py_DECREF(array4); 
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_eigenmode_coefficients_and_kpoints__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  SwigValueWrapper< meep::dft_flux > arg2 ;
  meep::volume *arg3 = 0 ;
  SwigValueWrapper< meep::diffractedplanewave > arg4 ;
  int arg5 ;
  double arg6 ;
  double arg7 ;
  std::complex< double > *arg8 = (std::complex< double > *) 0 ;
  double *arg9 = (double *) 0 ;
  meep::kpoint_func arg10 = (meep::kpoint_func) 0 ;
  void *arg11 = (void *) 0 ;
  double *arg12 = (double *) 0 ;
  meep::direction arg13 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  int val13 ;
  int ecode13 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  kpoint_list result;
  
  if (!PyArg_UnpackTuple(args, "get_eigenmode_coefficients_and_kpoints", 12, 12, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_eigenmode_coefficients_and_kpoints" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  {
    res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__dft_flux,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_eigenmode_coefficients_and_kpoints" "', argument " "2"" of type '" "meep::dft_flux""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "get_eigenmode_coefficients_and_kpoints" "', argument " "2"" of type '" "meep::dft_flux""'");
    } else {
      meep::dft_flux * temp = reinterpret_cast< meep::dft_flux * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "get_eigenmode_coefficients_and_kpoints" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "get_eigenmode_coefficients_and_kpoints" "', argument " "3"" of type '" "meep::volume const &""'"); 
  }
  arg3 = reinterpret_cast< meep::volume * >(argp3);
  {
    res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_meep__diffractedplanewave,  0  | 0);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "get_eigenmode_coefficients_and_kpoints" "', argument " "4"" of type '" "meep::diffractedplanewave""'"); 
    }  
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "get_eigenmode_coefficients_and_kpoints" "', argument " "4"" of type '" "meep::diffractedplanewave""'");
    } else {
      meep::diffractedplanewave * temp = reinterpret_cast< meep::diffractedplanewave * >(argp4);
      arg4 = *temp;
      if (SWIG_IsNewObj(res4)) delete temp;
    }
  }
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "get_eigenmode_coefficients_and_kpoints" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "get_eigenmode_coefficients_and_kpoints" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_double(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "get_eigenmode_coefficients_and_kpoints" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  {
    arg8 = (std::complex<double> *)array_data(obj7);
  }
  {
    arg9 = (double *)array_data(obj8);
  }
  {
    if (obj9 == Py_None) {
      arg10 = NULL;
      arg11 = NULL;
    }
    else {
      arg10 = py_kpoint_func_wrap;
      arg11 = (void*)obj9;
    }
  }
  {
    arg12 = (double *)array_data(obj10);
  }
  ecode13 = SWIG_AsVal_int(obj11, &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "get_eigenmode_coefficients_and_kpoints" "', argument " "13"" of type '" "meep::direction""'");
  } 
  arg13 = static_cast< meep::direction >(val13);
  {
    try {
      result = get_eigenmode_coefficients_and_kpoints(arg1,arg2,(meep::volume const &)*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  {
    PyObject *py_kpoints = PyList_New((&result)->n);
    PyObject *py_kdom = PyList_New((&result)->num_bands);
    
    for (size_t i = 0; i < (&result)->n; ++i) {
      PyList_SetItem(py_kpoints, i, vec2py((&result)->kpoints[i], true));
    }
    for (size_t i = 0; i < (&result)->num_bands; ++i) {
      PyList_SetItem(py_kdom, i, vec2py((&result)->kdom[i], true));
    }
    
    resultobj = Py_BuildValue("(O,O)", py_kpoints, py_kdom);
    
    Py_DECREF(py_kpoints);
    Py_DECREF(py_kdom);
    delete[] (&result)->kpoints;
    delete[] (&result)->kdom;
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_get_eigenmode_coefficients_and_kpoints(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[13] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 12) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 12) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_ConvertPtr(argv[3], 0, SWIGTYPE_p_meep__diffractedplanewave, SWIG_POINTER_NO_NULL | 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_double(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    _v = is_array(argv[7]);
                  }
                  if (_v) {
                    {
                      _v = is_array(argv[8]);
                    }
                    if (_v) {
                      {
                        _v = PyFunction_Check(argv[9]) || argv[9] == Py_None;
                      }
                      if (_v) {
                        {
                          _v = is_array(argv[10]);
                        }
                        if (_v) {
                          {
                            int res = SWIG_AsVal_int(argv[11], NULL);
                            _v = SWIG_CheckState(res);
                          }
                          if (_v) {
                            return _wrap_get_eigenmode_coefficients_and_kpoints__SWIG_1(self, args);
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 12) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__dft_flux, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            _v = is_array(argv[3]) || PySequence_Check(argv[3]);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_double(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    _v = is_array(argv[7]);
                  }
                  if (_v) {
                    {
                      _v = is_array(argv[8]);
                    }
                    if (_v) {
                      {
                        _v = PyFunction_Check(argv[9]) || argv[9] == Py_None;
                      }
                      if (_v) {
                        {
                          _v = is_array(argv[10]);
                        }
                        if (_v) {
                          {
                            int res = SWIG_AsVal_int(argv[11], NULL);
                            _v = SWIG_CheckState(res);
                          }
                          if (_v) {
                            return _wrap_get_eigenmode_coefficients_and_kpoints__SWIG_0(self, args);
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'get_eigenmode_coefficients_and_kpoints'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    get_eigenmode_coefficients_and_kpoints(meep::fields *,meep::dft_flux,meep::volume const &,int *,int,int,double,double,std::complex< double > *,double *,meep::kpoint_func,void *,double *,meep::direction)\n"
    "    get_eigenmode_coefficients_and_kpoints(meep::fields *,meep::dft_flux,meep::volume const &,meep::diffractedplanewave,int,double,double,std::complex< double > *,double *,meep::kpoint_func,void *,double *,meep::direction)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap__get_array_slice_dimensions__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  size_t *arg3 ;
  bool arg4 ;
  bool arg5 ;
  meep::component arg6 ;
  PyObject *arg7 = (PyObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "_get_array_slice_dimensions", 7, 7, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_get_array_slice_dimensions" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "_get_array_slice_dimensions" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "_get_array_slice_dimensions" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    arg3 = (size_t *)array_data(obj2);
  }
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "_get_array_slice_dimensions" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "_get_array_slice_dimensions" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  {
    arg6 = static_cast<meep::component>(PyInteger_AsLong(obj5));
  }
  arg7 = obj6;
  {
    try {
      result = (PyObject *)_get_array_slice_dimensions(arg1,(meep::volume const &)*arg2,arg3,arg4,arg5,arg6,arg7);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap__get_array_slice_dimensions__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  size_t *arg3 ;
  bool arg4 ;
  bool arg5 ;
  meep::component arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "_get_array_slice_dimensions", 6, 6, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_get_array_slice_dimensions" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "_get_array_slice_dimensions" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "_get_array_slice_dimensions" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    arg3 = (size_t *)array_data(obj2);
  }
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "_get_array_slice_dimensions" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "_get_array_slice_dimensions" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  {
    arg6 = static_cast<meep::component>(PyInteger_AsLong(obj5));
  }
  {
    try {
      result = (PyObject *)_get_array_slice_dimensions(arg1,(meep::volume const &)*arg2,arg3,arg4,arg5,arg6);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap__get_array_slice_dimensions__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::fields *arg1 = (meep::fields *) 0 ;
  meep::volume *arg2 = 0 ;
  size_t *arg3 ;
  bool arg4 ;
  bool arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  bool val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject *result = 0 ;
  
  if (!PyArg_UnpackTuple(args, "_get_array_slice_dimensions", 5, 5, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__fields, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_get_array_slice_dimensions" "', argument " "1"" of type '" "meep::fields *""'"); 
  }
  arg1 = reinterpret_cast< meep::fields * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_meep__volume,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "_get_array_slice_dimensions" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "_get_array_slice_dimensions" "', argument " "2"" of type '" "meep::volume const &""'"); 
  }
  arg2 = reinterpret_cast< meep::volume * >(argp2);
  {
    arg3 = (size_t *)array_data(obj2);
  }
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "_get_array_slice_dimensions" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  ecode5 = SWIG_AsVal_bool(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "_get_array_slice_dimensions" "', argument " "5"" of type '" "bool""'");
  } 
  arg5 = static_cast< bool >(val5);
  {
    try {
      result = (PyObject *)_get_array_slice_dimensions(arg1,(meep::volume const &)*arg2,arg3,arg4,arg5);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap__get_array_slice_dimensions(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[8] = {
    0
  };
  Py_ssize_t ii;
  
  if (!PyTuple_Check(args)) SWIG_fail;
  argc = PyObject_Length(args);
  for (ii = 0; (ii < 7) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = is_array(argv[2]);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap__get_array_slice_dimensions__SWIG_2(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = is_array(argv[2]);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                _v = PyInteger_Check(argv[5]) && PyInteger_AsLong(argv[5]) < 100;
              }
              if (_v) {
                return _wrap__get_array_slice_dimensions__SWIG_1(self, args);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_meep__fields, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_meep__volume, SWIG_POINTER_NO_NULL | 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          _v = is_array(argv[2]);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_bool(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_bool(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                _v = PyInteger_Check(argv[5]) && PyInteger_AsLong(argv[5]) < 100;
              }
              if (_v) {
                {
                  _v = PyList_Check(argv[6]);
                }
                if (_v) {
                  return _wrap__get_array_slice_dimensions__SWIG_0(self, args);
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function '_get_array_slice_dimensions'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    _get_array_slice_dimensions(meep::fields *,meep::volume const &,size_t [3],bool,bool,meep::component,PyObject *)\n"
    "    _get_array_slice_dimensions(meep::fields *,meep::volume const &,size_t [3],bool,bool,meep::component)\n"
    "    _get_array_slice_dimensions(meep::fields *,meep::volume const &,size_t [3],bool,bool)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_get_realnum_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  size_t result;
  
  if (!PyArg_UnpackTuple(args, "get_realnum_size", 0, 0)) SWIG_fail;
  {
    try {
      result = get_realnum_size();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_is_single_precision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  bool result;
  
  if (!PyArg_UnpackTuple(args, "is_single_precision", 0, 0)) SWIG_fail;
  {
    try {
      result = (bool)is_single_precision();
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_create_structure(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  vector3 arg1 ;
  std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > arg2 ;
  std::vector< meep::volume,std::allocator< meep::volume > > arg3 ;
  std::vector< meep::volume,std::allocator< meep::volume > > arg4 ;
  std::vector< meep::volume,std::allocator< meep::volume > > arg5 ;
  std::vector< meep::volume,std::allocator< meep::volume > > arg6 ;
  meep::grid_volume *arg7 = 0 ;
  meep::boundary_region *arg8 = 0 ;
  meep::symmetry *arg9 = 0 ;
  int arg10 ;
  double arg11 ;
  bool arg12 ;
  double arg13 ;
  int arg14 ;
  geometric_object_list arg15 ;
  vector3 arg16 ;
  bool arg17 ;
  meep_geom::material_type arg18 ;
  meep_geom::absorber_list arg19 = (meep_geom::absorber_list) 0 ;
  meep_geom::material_type_list arg20 ;
  bool arg21 ;
  bool arg22 ;
  meep::structure *arg23 = (meep::structure *) 0 ;
  bool arg24 ;
  meep::binary_partition *arg25 = (meep::binary_partition *) 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  int val10 ;
  int ecode10 = 0 ;
  double val11 ;
  int ecode11 = 0 ;
  bool val12 ;
  int ecode12 = 0 ;
  double val13 ;
  int ecode13 = 0 ;
  int val14 ;
  int ecode14 = 0 ;
  bool val17 ;
  int ecode17 = 0 ;
  bool val21 ;
  int ecode21 = 0 ;
  bool val22 ;
  int ecode22 = 0 ;
  void *argp23 = 0 ;
  int res23 = 0 ;
  bool val24 ;
  int ecode24 = 0 ;
  std::unique_ptr< meep::binary_partition > temp25 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  PyObject * obj14 = 0 ;
  PyObject * obj15 = 0 ;
  PyObject * obj16 = 0 ;
  PyObject * obj17 = 0 ;
  PyObject * obj18 = 0 ;
  PyObject * obj19 = 0 ;
  PyObject * obj20 = 0 ;
  PyObject * obj21 = 0 ;
  PyObject * obj22 = 0 ;
  PyObject * obj23 = 0 ;
  PyObject * obj24 = 0 ;
  meep::structure *result = 0 ;
  
  {
    (&arg15)->num_items = 0;
    (&arg15)->items = NULL;
  }
  {
    arg18 = NULL;
  }
  {
    arg19 = NULL;
  }
  {
    (&arg20)->num_items = 0;
    (&arg20)->items = NULL;
  }
  {
    arg25 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "create_structure", 25, 25, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13, &obj14, &obj15, &obj16, &obj17, &obj18, &obj19, &obj20, &obj21, &obj22, &obj23, &obj24)) SWIG_fail;
  {
    if(!pyv3_to_v3(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  {
    std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > *ptr = (std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > *)0;
    int res = swig::asptr(obj1, &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "create_structure" "', argument " "2"" of type '" "std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > >""'"); 
    }
    arg2 = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  {
    std::vector< meep::volume,std::allocator< meep::volume > > *ptr = (std::vector< meep::volume,std::allocator< meep::volume > > *)0;
    int res = swig::asptr(obj2, &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "create_structure" "', argument " "3"" of type '" "std::vector< meep::volume,std::allocator< meep::volume > >""'"); 
    }
    arg3 = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  {
    std::vector< meep::volume,std::allocator< meep::volume > > *ptr = (std::vector< meep::volume,std::allocator< meep::volume > > *)0;
    int res = swig::asptr(obj3, &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "create_structure" "', argument " "4"" of type '" "std::vector< meep::volume,std::allocator< meep::volume > >""'"); 
    }
    arg4 = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  {
    std::vector< meep::volume,std::allocator< meep::volume > > *ptr = (std::vector< meep::volume,std::allocator< meep::volume > > *)0;
    int res = swig::asptr(obj4, &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "create_structure" "', argument " "5"" of type '" "std::vector< meep::volume,std::allocator< meep::volume > >""'"); 
    }
    arg5 = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  {
    std::vector< meep::volume,std::allocator< meep::volume > > *ptr = (std::vector< meep::volume,std::allocator< meep::volume > > *)0;
    int res = swig::asptr(obj5, &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "create_structure" "', argument " "6"" of type '" "std::vector< meep::volume,std::allocator< meep::volume > >""'"); 
    }
    arg6 = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_meep__grid_volume,  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "create_structure" "', argument " "7"" of type '" "meep::grid_volume &""'"); 
  }
  if (!argp7) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "create_structure" "', argument " "7"" of type '" "meep::grid_volume &""'"); 
  }
  arg7 = reinterpret_cast< meep::grid_volume * >(argp7);
  res8 = SWIG_ConvertPtr(obj7, &argp8, SWIGTYPE_p_meep__boundary_region,  0  | 0);
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "create_structure" "', argument " "8"" of type '" "meep::boundary_region const &""'"); 
  }
  if (!argp8) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "create_structure" "', argument " "8"" of type '" "meep::boundary_region const &""'"); 
  }
  arg8 = reinterpret_cast< meep::boundary_region * >(argp8);
  res9 = SWIG_ConvertPtr(obj8, &argp9, SWIGTYPE_p_meep__symmetry,  0  | 0);
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "create_structure" "', argument " "9"" of type '" "meep::symmetry const &""'"); 
  }
  if (!argp9) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "create_structure" "', argument " "9"" of type '" "meep::symmetry const &""'"); 
  }
  arg9 = reinterpret_cast< meep::symmetry * >(argp9);
  ecode10 = SWIG_AsVal_int(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "create_structure" "', argument " "10"" of type '" "int""'");
  } 
  arg10 = static_cast< int >(val10);
  ecode11 = SWIG_AsVal_double(obj10, &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "create_structure" "', argument " "11"" of type '" "double""'");
  } 
  arg11 = static_cast< double >(val11);
  ecode12 = SWIG_AsVal_bool(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "create_structure" "', argument " "12"" of type '" "bool""'");
  } 
  arg12 = static_cast< bool >(val12);
  ecode13 = SWIG_AsVal_double(obj12, &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "create_structure" "', argument " "13"" of type '" "double""'");
  } 
  arg13 = static_cast< double >(val13);
  ecode14 = SWIG_AsVal_int(obj13, &val14);
  if (!SWIG_IsOK(ecode14)) {
    SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "create_structure" "', argument " "14"" of type '" "int""'");
  } 
  arg14 = static_cast< int >(val14);
  {
    if(!py_list_to_gobj_list(obj14, &arg15)) {
      SWIG_fail;
    }
  }
  {
    if(!pyv3_to_v3(obj15, &arg16)) {
      SWIG_fail;
    }
  }
  ecode17 = SWIG_AsVal_bool(obj16, &val17);
  if (!SWIG_IsOK(ecode17)) {
    SWIG_exception_fail(SWIG_ArgError(ecode17), "in method '" "create_structure" "', argument " "17"" of type '" "bool""'");
  } 
  arg17 = static_cast< bool >(val17);
  {
    if(!pymaterial_to_material(obj17, &arg18)) {
      SWIG_fail;
    }
  }
  {
    Py_ssize_t len = PyList_Size(obj18);
    
    if (len == 0) {
      arg19 = 0;
    } else {
      arg19 = create_absorber_list();
      
      for (Py_ssize_t i = 0; i < len; i++) {
        absorber a;
        PyObject *py_absorber = PyList_GetItem(obj18, i);
        
        if (!pyabsorber_to_absorber(py_absorber, &a)) {
          SWIG_fail;
        }
        
        add_absorbing_layer(arg19, a.thickness, a.direction, a.side,
          a.R_asymptotic, a.mean_stretch, py_pml_profile,
          a.pml_profile_data);
        Py_DECREF((PyObject *)a.pml_profile_data);
      }
    }
  }
  {
    Py_ssize_t len = PyList_Size(obj19);
    
    if (len == 0) {
      arg20 = material_type_list();
    } else {
      material_type_list mtl;
      mtl.num_items = len;
      mtl.items = new material_type[len];
      for (Py_ssize_t i = 0; i < len; i++) {
        PyObject *py_material = PyList_GetItem(obj19, i);
        if (!pymaterial_to_material(py_material, &mtl.items[i])) {
          SWIG_fail;
        }
      }
      arg20 = mtl;
    }
  }
  ecode21 = SWIG_AsVal_bool(obj20, &val21);
  if (!SWIG_IsOK(ecode21)) {
    SWIG_exception_fail(SWIG_ArgError(ecode21), "in method '" "create_structure" "', argument " "21"" of type '" "bool""'");
  } 
  arg21 = static_cast< bool >(val21);
  ecode22 = SWIG_AsVal_bool(obj21, &val22);
  if (!SWIG_IsOK(ecode22)) {
    SWIG_exception_fail(SWIG_ArgError(ecode22), "in method '" "create_structure" "', argument " "22"" of type '" "bool""'");
  } 
  arg22 = static_cast< bool >(val22);
  res23 = SWIG_ConvertPtr(obj22, &argp23,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res23)) {
    SWIG_exception_fail(SWIG_ArgError(res23), "in method '" "create_structure" "', argument " "23"" of type '" "meep::structure *""'"); 
  }
  arg23 = reinterpret_cast< meep::structure * >(argp23);
  ecode24 = SWIG_AsVal_bool(obj23, &val24);
  if (!SWIG_IsOK(ecode24)) {
    SWIG_exception_fail(SWIG_ArgError(ecode24), "in method '" "create_structure" "', argument " "24"" of type '" "bool""'");
  } 
  arg24 = static_cast< bool >(val24);
  {
    temp25 = py_bp_to_bp(obj24);
    arg25 = temp25.get();
  }
  {
    try {
      result = (meep::structure *)create_structure(arg1,arg2,arg3,arg4,arg5,arg6,*arg7,(meep::boundary_region const &)*arg8,(meep::symmetry const &)*arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21,arg22,arg23,arg24,(meep::binary_partition const *)arg25);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep__structure, SWIG_POINTER_OWN |  0 );
  {
    gobj_list_freearg(&arg15);
  }
  {
    if (arg18) {
      material_free(arg18);
    }
  }
  {
    destroy_absorber_list(arg19);
  }
  {
    if ((&arg20)->num_items != 0) {
      for (int i = 0; i < (&arg20)->num_items; i++) {
        material_free((&arg20)->items[i]);
      }
    }
    delete[] (&arg20)->items;
  }
  return resultobj;
fail:
  {
    gobj_list_freearg(&arg15);
  }
  {
    if (arg18) {
      material_free(arg18);
    }
  }
  {
    destroy_absorber_list(arg19);
  }
  {
    if ((&arg20)->num_items != 0) {
      for (int i = 0; i < (&arg20)->num_items; i++) {
        material_free((&arg20)->items[i]);
      }
    }
    delete[] (&arg20)->items;
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap__set_materials(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  meep::structure *arg1 = (meep::structure *) 0 ;
  vector3 arg2 ;
  meep::grid_volume *arg3 = 0 ;
  bool arg4 ;
  double arg5 ;
  int arg6 ;
  geometric_object_list arg7 ;
  vector3 arg8 ;
  bool arg9 ;
  meep_geom::material_type arg10 ;
  meep_geom::absorber_list arg11 = (meep_geom::absorber_list) 0 ;
  meep_geom::material_type_list arg12 ;
  bool arg13 ;
  bool arg14 ;
  meep_geom::geom_epsilon *arg15 = (meep_geom::geom_epsilon *) 0 ;
  bool arg16 ;
  meep::binary_partition *arg17 = (meep::binary_partition *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  bool val9 ;
  int ecode9 = 0 ;
  bool val13 ;
  int ecode13 = 0 ;
  bool val14 ;
  int ecode14 = 0 ;
  void *argp15 = 0 ;
  int res15 = 0 ;
  bool val16 ;
  int ecode16 = 0 ;
  std::unique_ptr< meep::binary_partition > temp17 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  PyObject * obj14 = 0 ;
  PyObject * obj15 = 0 ;
  PyObject * obj16 = 0 ;
  meep_geom::geom_epsilon *result = 0 ;
  
  {
    (&arg7)->num_items = 0;
    (&arg7)->items = NULL;
  }
  {
    arg10 = NULL;
  }
  {
    arg11 = NULL;
  }
  {
    (&arg12)->num_items = 0;
    (&arg12)->items = NULL;
  }
  {
    arg17 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "_set_materials", 17, 17, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13, &obj14, &obj15, &obj16)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_meep__structure, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "_set_materials" "', argument " "1"" of type '" "meep::structure *""'"); 
  }
  arg1 = reinterpret_cast< meep::structure * >(argp1);
  {
    if(!pyv3_to_v3(obj1, &arg2)) {
      SWIG_fail;
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_meep__grid_volume,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "_set_materials" "', argument " "3"" of type '" "meep::grid_volume &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "_set_materials" "', argument " "3"" of type '" "meep::grid_volume &""'"); 
  }
  arg3 = reinterpret_cast< meep::grid_volume * >(argp3);
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "_set_materials" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "_set_materials" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "_set_materials" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  {
    if(!py_list_to_gobj_list(obj6, &arg7)) {
      SWIG_fail;
    }
  }
  {
    if(!pyv3_to_v3(obj7, &arg8)) {
      SWIG_fail;
    }
  }
  ecode9 = SWIG_AsVal_bool(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "_set_materials" "', argument " "9"" of type '" "bool""'");
  } 
  arg9 = static_cast< bool >(val9);
  {
    if(!pymaterial_to_material(obj9, &arg10)) {
      SWIG_fail;
    }
  }
  {
    Py_ssize_t len = PyList_Size(obj10);
    
    if (len == 0) {
      arg11 = 0;
    } else {
      arg11 = create_absorber_list();
      
      for (Py_ssize_t i = 0; i < len; i++) {
        absorber a;
        PyObject *py_absorber = PyList_GetItem(obj10, i);
        
        if (!pyabsorber_to_absorber(py_absorber, &a)) {
          SWIG_fail;
        }
        
        add_absorbing_layer(arg11, a.thickness, a.direction, a.side,
          a.R_asymptotic, a.mean_stretch, py_pml_profile,
          a.pml_profile_data);
        Py_DECREF((PyObject *)a.pml_profile_data);
      }
    }
  }
  {
    Py_ssize_t len = PyList_Size(obj11);
    
    if (len == 0) {
      arg12 = material_type_list();
    } else {
      material_type_list mtl;
      mtl.num_items = len;
      mtl.items = new material_type[len];
      for (Py_ssize_t i = 0; i < len; i++) {
        PyObject *py_material = PyList_GetItem(obj11, i);
        if (!pymaterial_to_material(py_material, &mtl.items[i])) {
          SWIG_fail;
        }
      }
      arg12 = mtl;
    }
  }
  ecode13 = SWIG_AsVal_bool(obj12, &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "_set_materials" "', argument " "13"" of type '" "bool""'");
  } 
  arg13 = static_cast< bool >(val13);
  ecode14 = SWIG_AsVal_bool(obj13, &val14);
  if (!SWIG_IsOK(ecode14)) {
    SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "_set_materials" "', argument " "14"" of type '" "bool""'");
  } 
  arg14 = static_cast< bool >(val14);
  res15 = SWIG_ConvertPtr(obj14, &argp15,SWIGTYPE_p_meep_geom__geom_epsilon, 0 |  0 );
  if (!SWIG_IsOK(res15)) {
    SWIG_exception_fail(SWIG_ArgError(res15), "in method '" "_set_materials" "', argument " "15"" of type '" "meep_geom::geom_epsilon *""'"); 
  }
  arg15 = reinterpret_cast< meep_geom::geom_epsilon * >(argp15);
  ecode16 = SWIG_AsVal_bool(obj15, &val16);
  if (!SWIG_IsOK(ecode16)) {
    SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "_set_materials" "', argument " "16"" of type '" "bool""'");
  } 
  arg16 = static_cast< bool >(val16);
  {
    temp17 = py_bp_to_bp(obj16);
    arg17 = temp17.get();
  }
  {
    try {
      result = (meep_geom::geom_epsilon *)_set_materials(arg1,arg2,*arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,(meep::binary_partition const *)arg17);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_meep_geom__geom_epsilon, SWIG_POINTER_OWN |  0 );
  {
    gobj_list_freearg(&arg7);
  }
  {
    if (arg10) {
      material_free(arg10);
    }
  }
  {
    destroy_absorber_list(arg11);
  }
  {
    if ((&arg12)->num_items != 0) {
      for (int i = 0; i < (&arg12)->num_items; i++) {
        material_free((&arg12)->items[i]);
      }
    }
    delete[] (&arg12)->items;
  }
  return resultobj;
fail:
  {
    gobj_list_freearg(&arg7);
  }
  {
    if (arg10) {
      material_free(arg10);
    }
  }
  {
    destroy_absorber_list(arg11);
  }
  {
    if ((&arg12)->num_items != 0) {
      for (int i = 0; i < (&arg12)->num_items; i++) {
        material_free((&arg12)->items[i]);
      }
    }
    delete[] (&arg12)->items;
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap__get_epsilon_grid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  geometric_object_list arg1 ;
  meep_geom::material_type_list arg2 ;
  meep_geom::material_type arg3 ;
  bool arg4 ;
  meep::grid_volume arg5 ;
  vector3 arg6 ;
  vector3 arg7 ;
  int arg8 ;
  double *arg9 = (double *) 0 ;
  int arg10 ;
  double *arg11 = (double *) 0 ;
  int arg12 ;
  double *arg13 = (double *) 0 ;
  std::complex< double > *arg14 = (std::complex< double > *) 0 ;
  double arg15 ;
  bool val4 ;
  int ecode4 = 0 ;
  void *argp5 ;
  int res5 = 0 ;
  int val8 ;
  int ecode8 = 0 ;
  int val10 ;
  int ecode10 = 0 ;
  int val12 ;
  int ecode12 = 0 ;
  double val15 ;
  int ecode15 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  PyObject * obj9 = 0 ;
  PyObject * obj10 = 0 ;
  PyObject * obj11 = 0 ;
  PyObject * obj12 = 0 ;
  PyObject * obj13 = 0 ;
  PyObject * obj14 = 0 ;
  
  {
    (&arg1)->num_items = 0;
    (&arg1)->items = NULL;
  }
  {
    (&arg2)->num_items = 0;
    (&arg2)->items = NULL;
  }
  {
    arg3 = NULL;
  }
  if (!PyArg_UnpackTuple(args, "_get_epsilon_grid", 15, 15, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12, &obj13, &obj14)) SWIG_fail;
  {
    if(!py_list_to_gobj_list(obj0, &arg1)) {
      SWIG_fail;
    }
  }
  {
    Py_ssize_t len = PyList_Size(obj1);
    
    if (len == 0) {
      arg2 = material_type_list();
    } else {
      material_type_list mtl;
      mtl.num_items = len;
      mtl.items = new material_type[len];
      for (Py_ssize_t i = 0; i < len; i++) {
        PyObject *py_material = PyList_GetItem(obj1, i);
        if (!pymaterial_to_material(py_material, &mtl.items[i])) {
          SWIG_fail;
        }
      }
      arg2 = mtl;
    }
  }
  {
    if(!pymaterial_to_material(obj2, &arg3)) {
      SWIG_fail;
    }
  }
  ecode4 = SWIG_AsVal_bool(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "_get_epsilon_grid" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  {
    res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_meep__grid_volume,  0  | 0);
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "_get_epsilon_grid" "', argument " "5"" of type '" "meep::grid_volume""'"); 
    }  
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "_get_epsilon_grid" "', argument " "5"" of type '" "meep::grid_volume""'");
    } else {
      meep::grid_volume * temp = reinterpret_cast< meep::grid_volume * >(argp5);
      arg5 = *temp;
      if (SWIG_IsNewObj(res5)) delete temp;
    }
  }
  {
    if(!pyv3_to_v3(obj5, &arg6)) {
      SWIG_fail;
    }
  }
  {
    if(!pyv3_to_v3(obj6, &arg7)) {
      SWIG_fail;
    }
  }
  ecode8 = SWIG_AsVal_int(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "_get_epsilon_grid" "', argument " "8"" of type '" "int""'");
  } 
  arg8 = static_cast< int >(val8);
  {
    arg9 = (double *)array_data(obj8);
  }
  ecode10 = SWIG_AsVal_int(obj9, &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "_get_epsilon_grid" "', argument " "10"" of type '" "int""'");
  } 
  arg10 = static_cast< int >(val10);
  {
    arg11 = (double *)array_data(obj10);
  }
  ecode12 = SWIG_AsVal_int(obj11, &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "_get_epsilon_grid" "', argument " "12"" of type '" "int""'");
  } 
  arg12 = static_cast< int >(val12);
  {
    arg13 = (double *)array_data(obj12);
  }
  {
    arg14 = (std::complex<double> *)array_data(obj13);
  }
  ecode15 = SWIG_AsVal_double(obj14, &val15);
  if (!SWIG_IsOK(ecode15)) {
    SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "_get_epsilon_grid" "', argument " "15"" of type '" "double""'");
  } 
  arg15 = static_cast< double >(val15);
  {
    try {
      _get_epsilon_grid(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
    } catch (std::runtime_error &e) {
      PyErr_SetString(PyExc_RuntimeError, e.what());
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  {
    gobj_list_freearg(&arg1);
  }
  {
    if ((&arg2)->num_items != 0) {
      for (int i = 0; i < (&arg2)->num_items; i++) {
        material_free((&arg2)->items[i]);
      }
    }
    delete[] (&arg2)->items;
  }
  {
    if (arg3) {
      material_free(arg3);
    }
  }
  return resultobj;
fail:
  {
    gobj_list_freearg(&arg1);
  }
  {
    if ((&arg2)->num_items != 0) {
      for (int i = 0; i < (&arg2)->num_items; i++) {
        material_free((&arg2)->items[i]);
      }
    }
    delete[] (&arg2)->items;
  }
  {
    if (arg3) {
      material_free(arg3);
    }
  }
  return NULL;
}


static PyMethodDef SwigMethods[] = {
	 { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
	 { "delete_SwigPyIterator", _wrap_delete_SwigPyIterator, METH_VARARGS, NULL},
	 { "SwigPyIterator_value", _wrap_SwigPyIterator_value, METH_VARARGS, NULL},
	 { "SwigPyIterator_incr", _wrap_SwigPyIterator_incr, METH_VARARGS, NULL},
	 { "SwigPyIterator_decr", _wrap_SwigPyIterator_decr, METH_VARARGS, NULL},
	 { "SwigPyIterator_distance", _wrap_SwigPyIterator_distance, METH_VARARGS, NULL},
	 { "SwigPyIterator_equal", _wrap_SwigPyIterator_equal, METH_VARARGS, NULL},
	 { "SwigPyIterator_copy", _wrap_SwigPyIterator_copy, METH_VARARGS, NULL},
	 { "SwigPyIterator_next", _wrap_SwigPyIterator_next, METH_VARARGS, NULL},
	 { "SwigPyIterator___next__", _wrap_SwigPyIterator___next__, METH_VARARGS, NULL},
	 { "SwigPyIterator_previous", _wrap_SwigPyIterator_previous, METH_VARARGS, NULL},
	 { "SwigPyIterator_advance", _wrap_SwigPyIterator_advance, METH_VARARGS, NULL},
	 { "SwigPyIterator___eq__", _wrap_SwigPyIterator___eq__, METH_VARARGS, NULL},
	 { "SwigPyIterator___ne__", _wrap_SwigPyIterator___ne__, METH_VARARGS, NULL},
	 { "SwigPyIterator___iadd__", _wrap_SwigPyIterator___iadd__, METH_VARARGS, NULL},
	 { "SwigPyIterator___isub__", _wrap_SwigPyIterator___isub__, METH_VARARGS, NULL},
	 { "SwigPyIterator___add__", _wrap_SwigPyIterator___add__, METH_VARARGS, NULL},
	 { "SwigPyIterator___sub__", _wrap_SwigPyIterator___sub__, METH_VARARGS, NULL},
	 { "SwigPyIterator_swigregister", SwigPyIterator_swigregister, METH_O, NULL},
	 { "set_ctl_printf_callback", _wrap_set_ctl_printf_callback, METH_VARARGS, NULL},
	 { "set_mpb_printf_callback", _wrap_set_mpb_printf_callback, METH_VARARGS, NULL},
	 { "py_do_harminv", _wrap_py_do_harminv, METH_VARARGS, NULL},
	 { "_get_farfield", _wrap__get_farfield, METH_VARARGS, NULL},
	 { "_get_farfields_array", _wrap__get_farfields_array, METH_VARARGS, NULL},
	 { "_dft_ldos_ldos", _wrap__dft_ldos_ldos, METH_VARARGS, NULL},
	 { "_dft_ldos_F", _wrap__dft_ldos_F, METH_VARARGS, NULL},
	 { "_dft_ldos_J", _wrap__dft_ldos_J, METH_VARARGS, NULL},
	 { "_get_dft_data_size", _wrap__get_dft_data_size, METH_VARARGS, NULL},
	 { "_get_dft_data", _wrap__get_dft_data, METH_VARARGS, NULL},
	 { "_load_dft_data", _wrap__load_dft_data, METH_VARARGS, NULL},
	 { "make_volume_list", _wrap_make_volume_list, METH_VARARGS, NULL},
	 { "_get_gradient", _wrap__get_gradient, METH_VARARGS, NULL},
	 { "get_dft_flux_array", _wrap_get_dft_flux_array, METH_VARARGS, NULL},
	 { "get_dft_fields_array", _wrap_get_dft_fields_array, METH_VARARGS, NULL},
	 { "get_dft_force_array", _wrap_get_dft_force_array, METH_VARARGS, NULL},
	 { "get_dft_near2far_array", _wrap_get_dft_near2far_array, METH_VARARGS, NULL},
	 { "FragmentStatsVector_iterator", _wrap_FragmentStatsVector_iterator, METH_VARARGS, NULL},
	 { "FragmentStatsVector___nonzero__", _wrap_FragmentStatsVector___nonzero__, METH_VARARGS, NULL},
	 { "FragmentStatsVector___bool__", _wrap_FragmentStatsVector___bool__, METH_VARARGS, NULL},
	 { "FragmentStatsVector___len__", _wrap_FragmentStatsVector___len__, METH_VARARGS, NULL},
	 { "FragmentStatsVector___getslice__", _wrap_FragmentStatsVector___getslice__, METH_VARARGS, NULL},
	 { "FragmentStatsVector___setslice__", _wrap_FragmentStatsVector___setslice__, METH_VARARGS, NULL},
	 { "FragmentStatsVector___delslice__", _wrap_FragmentStatsVector___delslice__, METH_VARARGS, NULL},
	 { "FragmentStatsVector___delitem__", _wrap_FragmentStatsVector___delitem__, METH_VARARGS, NULL},
	 { "FragmentStatsVector___getitem__", _wrap_FragmentStatsVector___getitem__, METH_VARARGS, NULL},
	 { "FragmentStatsVector___setitem__", _wrap_FragmentStatsVector___setitem__, METH_VARARGS, NULL},
	 { "FragmentStatsVector_pop", _wrap_FragmentStatsVector_pop, METH_VARARGS, NULL},
	 { "FragmentStatsVector_append", _wrap_FragmentStatsVector_append, METH_VARARGS, NULL},
	 { "FragmentStatsVector_empty", _wrap_FragmentStatsVector_empty, METH_VARARGS, NULL},
	 { "FragmentStatsVector_size", _wrap_FragmentStatsVector_size, METH_VARARGS, NULL},
	 { "FragmentStatsVector_swap", _wrap_FragmentStatsVector_swap, METH_VARARGS, NULL},
	 { "FragmentStatsVector_begin", _wrap_FragmentStatsVector_begin, METH_VARARGS, NULL},
	 { "FragmentStatsVector_end", _wrap_FragmentStatsVector_end, METH_VARARGS, NULL},
	 { "FragmentStatsVector_rbegin", _wrap_FragmentStatsVector_rbegin, METH_VARARGS, NULL},
	 { "FragmentStatsVector_rend", _wrap_FragmentStatsVector_rend, METH_VARARGS, NULL},
	 { "FragmentStatsVector_clear", _wrap_FragmentStatsVector_clear, METH_VARARGS, NULL},
	 { "FragmentStatsVector_get_allocator", _wrap_FragmentStatsVector_get_allocator, METH_VARARGS, NULL},
	 { "FragmentStatsVector_pop_back", _wrap_FragmentStatsVector_pop_back, METH_VARARGS, NULL},
	 { "FragmentStatsVector_erase", _wrap_FragmentStatsVector_erase, METH_VARARGS, NULL},
	 { "new_FragmentStatsVector", _wrap_new_FragmentStatsVector, METH_VARARGS, NULL},
	 { "FragmentStatsVector_push_back", _wrap_FragmentStatsVector_push_back, METH_VARARGS, NULL},
	 { "FragmentStatsVector_front", _wrap_FragmentStatsVector_front, METH_VARARGS, NULL},
	 { "FragmentStatsVector_back", _wrap_FragmentStatsVector_back, METH_VARARGS, NULL},
	 { "FragmentStatsVector_assign", _wrap_FragmentStatsVector_assign, METH_VARARGS, NULL},
	 { "FragmentStatsVector_resize", _wrap_FragmentStatsVector_resize, METH_VARARGS, NULL},
	 { "FragmentStatsVector_insert", _wrap_FragmentStatsVector_insert, METH_VARARGS, NULL},
	 { "FragmentStatsVector_reserve", _wrap_FragmentStatsVector_reserve, METH_VARARGS, NULL},
	 { "FragmentStatsVector_capacity", _wrap_FragmentStatsVector_capacity, METH_VARARGS, NULL},
	 { "delete_FragmentStatsVector", _wrap_delete_FragmentStatsVector, METH_VARARGS, NULL},
	 { "FragmentStatsVector_swigregister", FragmentStatsVector_swigregister, METH_O, NULL},
	 { "FragmentStatsVector_swiginit", FragmentStatsVector_swiginit, METH_VARARGS, NULL},
	 { "DftDataVector_iterator", _wrap_DftDataVector_iterator, METH_VARARGS, NULL},
	 { "DftDataVector___nonzero__", _wrap_DftDataVector___nonzero__, METH_VARARGS, NULL},
	 { "DftDataVector___bool__", _wrap_DftDataVector___bool__, METH_VARARGS, NULL},
	 { "DftDataVector___len__", _wrap_DftDataVector___len__, METH_VARARGS, NULL},
	 { "DftDataVector___getslice__", _wrap_DftDataVector___getslice__, METH_VARARGS, NULL},
	 { "DftDataVector___setslice__", _wrap_DftDataVector___setslice__, METH_VARARGS, NULL},
	 { "DftDataVector___delslice__", _wrap_DftDataVector___delslice__, METH_VARARGS, NULL},
	 { "DftDataVector___delitem__", _wrap_DftDataVector___delitem__, METH_VARARGS, NULL},
	 { "DftDataVector___getitem__", _wrap_DftDataVector___getitem__, METH_VARARGS, NULL},
	 { "DftDataVector___setitem__", _wrap_DftDataVector___setitem__, METH_VARARGS, NULL},
	 { "DftDataVector_pop", _wrap_DftDataVector_pop, METH_VARARGS, NULL},
	 { "DftDataVector_append", _wrap_DftDataVector_append, METH_VARARGS, NULL},
	 { "DftDataVector_empty", _wrap_DftDataVector_empty, METH_VARARGS, NULL},
	 { "DftDataVector_size", _wrap_DftDataVector_size, METH_VARARGS, NULL},
	 { "DftDataVector_swap", _wrap_DftDataVector_swap, METH_VARARGS, NULL},
	 { "DftDataVector_begin", _wrap_DftDataVector_begin, METH_VARARGS, NULL},
	 { "DftDataVector_end", _wrap_DftDataVector_end, METH_VARARGS, NULL},
	 { "DftDataVector_rbegin", _wrap_DftDataVector_rbegin, METH_VARARGS, NULL},
	 { "DftDataVector_rend", _wrap_DftDataVector_rend, METH_VARARGS, NULL},
	 { "DftDataVector_clear", _wrap_DftDataVector_clear, METH_VARARGS, NULL},
	 { "DftDataVector_get_allocator", _wrap_DftDataVector_get_allocator, METH_VARARGS, NULL},
	 { "DftDataVector_pop_back", _wrap_DftDataVector_pop_back, METH_VARARGS, NULL},
	 { "DftDataVector_erase", _wrap_DftDataVector_erase, METH_VARARGS, NULL},
	 { "new_DftDataVector", _wrap_new_DftDataVector, METH_VARARGS, NULL},
	 { "DftDataVector_push_back", _wrap_DftDataVector_push_back, METH_VARARGS, NULL},
	 { "DftDataVector_front", _wrap_DftDataVector_front, METH_VARARGS, NULL},
	 { "DftDataVector_back", _wrap_DftDataVector_back, METH_VARARGS, NULL},
	 { "DftDataVector_assign", _wrap_DftDataVector_assign, METH_VARARGS, NULL},
	 { "DftDataVector_insert", _wrap_DftDataVector_insert, METH_VARARGS, NULL},
	 { "DftDataVector_reserve", _wrap_DftDataVector_reserve, METH_VARARGS, NULL},
	 { "DftDataVector_capacity", _wrap_DftDataVector_capacity, METH_VARARGS, NULL},
	 { "delete_DftDataVector", _wrap_delete_DftDataVector, METH_VARARGS, NULL},
	 { "DftDataVector_swigregister", DftDataVector_swigregister, METH_O, NULL},
	 { "DftDataVector_swiginit", DftDataVector_swiginit, METH_VARARGS, NULL},
	 { "VolumeVector_iterator", _wrap_VolumeVector_iterator, METH_VARARGS, NULL},
	 { "VolumeVector___nonzero__", _wrap_VolumeVector___nonzero__, METH_VARARGS, NULL},
	 { "VolumeVector___bool__", _wrap_VolumeVector___bool__, METH_VARARGS, NULL},
	 { "VolumeVector___len__", _wrap_VolumeVector___len__, METH_VARARGS, NULL},
	 { "VolumeVector___getslice__", _wrap_VolumeVector___getslice__, METH_VARARGS, NULL},
	 { "VolumeVector___setslice__", _wrap_VolumeVector___setslice__, METH_VARARGS, NULL},
	 { "VolumeVector___delslice__", _wrap_VolumeVector___delslice__, METH_VARARGS, NULL},
	 { "VolumeVector___delitem__", _wrap_VolumeVector___delitem__, METH_VARARGS, NULL},
	 { "VolumeVector___getitem__", _wrap_VolumeVector___getitem__, METH_VARARGS, NULL},
	 { "VolumeVector___setitem__", _wrap_VolumeVector___setitem__, METH_VARARGS, NULL},
	 { "VolumeVector_pop", _wrap_VolumeVector_pop, METH_VARARGS, NULL},
	 { "VolumeVector_append", _wrap_VolumeVector_append, METH_VARARGS, NULL},
	 { "VolumeVector_empty", _wrap_VolumeVector_empty, METH_VARARGS, NULL},
	 { "VolumeVector_size", _wrap_VolumeVector_size, METH_VARARGS, NULL},
	 { "VolumeVector_swap", _wrap_VolumeVector_swap, METH_VARARGS, NULL},
	 { "VolumeVector_begin", _wrap_VolumeVector_begin, METH_VARARGS, NULL},
	 { "VolumeVector_end", _wrap_VolumeVector_end, METH_VARARGS, NULL},
	 { "VolumeVector_rbegin", _wrap_VolumeVector_rbegin, METH_VARARGS, NULL},
	 { "VolumeVector_rend", _wrap_VolumeVector_rend, METH_VARARGS, NULL},
	 { "VolumeVector_clear", _wrap_VolumeVector_clear, METH_VARARGS, NULL},
	 { "VolumeVector_get_allocator", _wrap_VolumeVector_get_allocator, METH_VARARGS, NULL},
	 { "VolumeVector_pop_back", _wrap_VolumeVector_pop_back, METH_VARARGS, NULL},
	 { "VolumeVector_erase", _wrap_VolumeVector_erase, METH_VARARGS, NULL},
	 { "new_VolumeVector", _wrap_new_VolumeVector, METH_VARARGS, NULL},
	 { "VolumeVector_push_back", _wrap_VolumeVector_push_back, METH_VARARGS, NULL},
	 { "VolumeVector_front", _wrap_VolumeVector_front, METH_VARARGS, NULL},
	 { "VolumeVector_back", _wrap_VolumeVector_back, METH_VARARGS, NULL},
	 { "VolumeVector_assign", _wrap_VolumeVector_assign, METH_VARARGS, NULL},
	 { "VolumeVector_insert", _wrap_VolumeVector_insert, METH_VARARGS, NULL},
	 { "VolumeVector_reserve", _wrap_VolumeVector_reserve, METH_VARARGS, NULL},
	 { "VolumeVector_capacity", _wrap_VolumeVector_capacity, METH_VARARGS, NULL},
	 { "delete_VolumeVector", _wrap_delete_VolumeVector, METH_VARARGS, NULL},
	 { "VolumeVector_swigregister", VolumeVector_swigregister, METH_O, NULL},
	 { "VolumeVector_swiginit", VolumeVector_swiginit, METH_VARARGS, NULL},
	 { "GridVolumeVector_iterator", _wrap_GridVolumeVector_iterator, METH_VARARGS, NULL},
	 { "GridVolumeVector___nonzero__", _wrap_GridVolumeVector___nonzero__, METH_VARARGS, NULL},
	 { "GridVolumeVector___bool__", _wrap_GridVolumeVector___bool__, METH_VARARGS, NULL},
	 { "GridVolumeVector___len__", _wrap_GridVolumeVector___len__, METH_VARARGS, NULL},
	 { "GridVolumeVector___getslice__", _wrap_GridVolumeVector___getslice__, METH_VARARGS, NULL},
	 { "GridVolumeVector___setslice__", _wrap_GridVolumeVector___setslice__, METH_VARARGS, NULL},
	 { "GridVolumeVector___delslice__", _wrap_GridVolumeVector___delslice__, METH_VARARGS, NULL},
	 { "GridVolumeVector___delitem__", _wrap_GridVolumeVector___delitem__, METH_VARARGS, NULL},
	 { "GridVolumeVector___getitem__", _wrap_GridVolumeVector___getitem__, METH_VARARGS, NULL},
	 { "GridVolumeVector___setitem__", _wrap_GridVolumeVector___setitem__, METH_VARARGS, NULL},
	 { "GridVolumeVector_pop", _wrap_GridVolumeVector_pop, METH_VARARGS, NULL},
	 { "GridVolumeVector_append", _wrap_GridVolumeVector_append, METH_VARARGS, NULL},
	 { "GridVolumeVector_empty", _wrap_GridVolumeVector_empty, METH_VARARGS, NULL},
	 { "GridVolumeVector_size", _wrap_GridVolumeVector_size, METH_VARARGS, NULL},
	 { "GridVolumeVector_swap", _wrap_GridVolumeVector_swap, METH_VARARGS, NULL},
	 { "GridVolumeVector_begin", _wrap_GridVolumeVector_begin, METH_VARARGS, NULL},
	 { "GridVolumeVector_end", _wrap_GridVolumeVector_end, METH_VARARGS, NULL},
	 { "GridVolumeVector_rbegin", _wrap_GridVolumeVector_rbegin, METH_VARARGS, NULL},
	 { "GridVolumeVector_rend", _wrap_GridVolumeVector_rend, METH_VARARGS, NULL},
	 { "GridVolumeVector_clear", _wrap_GridVolumeVector_clear, METH_VARARGS, NULL},
	 { "GridVolumeVector_get_allocator", _wrap_GridVolumeVector_get_allocator, METH_VARARGS, NULL},
	 { "GridVolumeVector_pop_back", _wrap_GridVolumeVector_pop_back, METH_VARARGS, NULL},
	 { "GridVolumeVector_erase", _wrap_GridVolumeVector_erase, METH_VARARGS, NULL},
	 { "new_GridVolumeVector", _wrap_new_GridVolumeVector, METH_VARARGS, NULL},
	 { "GridVolumeVector_push_back", _wrap_GridVolumeVector_push_back, METH_VARARGS, NULL},
	 { "GridVolumeVector_front", _wrap_GridVolumeVector_front, METH_VARARGS, NULL},
	 { "GridVolumeVector_back", _wrap_GridVolumeVector_back, METH_VARARGS, NULL},
	 { "GridVolumeVector_assign", _wrap_GridVolumeVector_assign, METH_VARARGS, NULL},
	 { "GridVolumeVector_resize", _wrap_GridVolumeVector_resize, METH_VARARGS, NULL},
	 { "GridVolumeVector_insert", _wrap_GridVolumeVector_insert, METH_VARARGS, NULL},
	 { "GridVolumeVector_reserve", _wrap_GridVolumeVector_reserve, METH_VARARGS, NULL},
	 { "GridVolumeVector_capacity", _wrap_GridVolumeVector_capacity, METH_VARARGS, NULL},
	 { "delete_GridVolumeVector", _wrap_delete_GridVolumeVector, METH_VARARGS, NULL},
	 { "GridVolumeVector_swigregister", GridVolumeVector_swigregister, METH_O, NULL},
	 { "GridVolumeVector_swiginit", GridVolumeVector_swiginit, METH_VARARGS, NULL},
	 { "IntVector_iterator", _wrap_IntVector_iterator, METH_VARARGS, NULL},
	 { "IntVector___nonzero__", _wrap_IntVector___nonzero__, METH_VARARGS, NULL},
	 { "IntVector___bool__", _wrap_IntVector___bool__, METH_VARARGS, NULL},
	 { "IntVector___len__", _wrap_IntVector___len__, METH_VARARGS, NULL},
	 { "IntVector___getslice__", _wrap_IntVector___getslice__, METH_VARARGS, NULL},
	 { "IntVector___setslice__", _wrap_IntVector___setslice__, METH_VARARGS, NULL},
	 { "IntVector___delslice__", _wrap_IntVector___delslice__, METH_VARARGS, NULL},
	 { "IntVector___delitem__", _wrap_IntVector___delitem__, METH_VARARGS, NULL},
	 { "IntVector___getitem__", _wrap_IntVector___getitem__, METH_VARARGS, NULL},
	 { "IntVector___setitem__", _wrap_IntVector___setitem__, METH_VARARGS, NULL},
	 { "IntVector_pop", _wrap_IntVector_pop, METH_VARARGS, NULL},
	 { "IntVector_append", _wrap_IntVector_append, METH_VARARGS, NULL},
	 { "IntVector_empty", _wrap_IntVector_empty, METH_VARARGS, NULL},
	 { "IntVector_size", _wrap_IntVector_size, METH_VARARGS, NULL},
	 { "IntVector_swap", _wrap_IntVector_swap, METH_VARARGS, NULL},
	 { "IntVector_begin", _wrap_IntVector_begin, METH_VARARGS, NULL},
	 { "IntVector_end", _wrap_IntVector_end, METH_VARARGS, NULL},
	 { "IntVector_rbegin", _wrap_IntVector_rbegin, METH_VARARGS, NULL},
	 { "IntVector_rend", _wrap_IntVector_rend, METH_VARARGS, NULL},
	 { "IntVector_clear", _wrap_IntVector_clear, METH_VARARGS, NULL},
	 { "IntVector_get_allocator", _wrap_IntVector_get_allocator, METH_VARARGS, NULL},
	 { "IntVector_pop_back", _wrap_IntVector_pop_back, METH_VARARGS, NULL},
	 { "IntVector_erase", _wrap_IntVector_erase, METH_VARARGS, NULL},
	 { "new_IntVector", _wrap_new_IntVector, METH_VARARGS, NULL},
	 { "IntVector_push_back", _wrap_IntVector_push_back, METH_VARARGS, NULL},
	 { "IntVector_front", _wrap_IntVector_front, METH_VARARGS, NULL},
	 { "IntVector_back", _wrap_IntVector_back, METH_VARARGS, NULL},
	 { "IntVector_assign", _wrap_IntVector_assign, METH_VARARGS, NULL},
	 { "IntVector_resize", _wrap_IntVector_resize, METH_VARARGS, NULL},
	 { "IntVector_insert", _wrap_IntVector_insert, METH_VARARGS, NULL},
	 { "IntVector_reserve", _wrap_IntVector_reserve, METH_VARARGS, NULL},
	 { "IntVector_capacity", _wrap_IntVector_capacity, METH_VARARGS, NULL},
	 { "delete_IntVector", _wrap_delete_IntVector, METH_VARARGS, NULL},
	 { "IntVector_swigregister", IntVector_swigregister, METH_O, NULL},
	 { "IntVector_swiginit", IntVector_swiginit, METH_VARARGS, NULL},
	 { "Size_t_Vector_iterator", _wrap_Size_t_Vector_iterator, METH_VARARGS, NULL},
	 { "Size_t_Vector___nonzero__", _wrap_Size_t_Vector___nonzero__, METH_VARARGS, NULL},
	 { "Size_t_Vector___bool__", _wrap_Size_t_Vector___bool__, METH_VARARGS, NULL},
	 { "Size_t_Vector___len__", _wrap_Size_t_Vector___len__, METH_VARARGS, NULL},
	 { "Size_t_Vector___getslice__", _wrap_Size_t_Vector___getslice__, METH_VARARGS, NULL},
	 { "Size_t_Vector___setslice__", _wrap_Size_t_Vector___setslice__, METH_VARARGS, NULL},
	 { "Size_t_Vector___delslice__", _wrap_Size_t_Vector___delslice__, METH_VARARGS, NULL},
	 { "Size_t_Vector___delitem__", _wrap_Size_t_Vector___delitem__, METH_VARARGS, NULL},
	 { "Size_t_Vector___getitem__", _wrap_Size_t_Vector___getitem__, METH_VARARGS, NULL},
	 { "Size_t_Vector___setitem__", _wrap_Size_t_Vector___setitem__, METH_VARARGS, NULL},
	 { "Size_t_Vector_pop", _wrap_Size_t_Vector_pop, METH_VARARGS, NULL},
	 { "Size_t_Vector_append", _wrap_Size_t_Vector_append, METH_VARARGS, NULL},
	 { "Size_t_Vector_empty", _wrap_Size_t_Vector_empty, METH_VARARGS, NULL},
	 { "Size_t_Vector_size", _wrap_Size_t_Vector_size, METH_VARARGS, NULL},
	 { "Size_t_Vector_swap", _wrap_Size_t_Vector_swap, METH_VARARGS, NULL},
	 { "Size_t_Vector_begin", _wrap_Size_t_Vector_begin, METH_VARARGS, NULL},
	 { "Size_t_Vector_end", _wrap_Size_t_Vector_end, METH_VARARGS, NULL},
	 { "Size_t_Vector_rbegin", _wrap_Size_t_Vector_rbegin, METH_VARARGS, NULL},
	 { "Size_t_Vector_rend", _wrap_Size_t_Vector_rend, METH_VARARGS, NULL},
	 { "Size_t_Vector_clear", _wrap_Size_t_Vector_clear, METH_VARARGS, NULL},
	 { "Size_t_Vector_get_allocator", _wrap_Size_t_Vector_get_allocator, METH_VARARGS, NULL},
	 { "Size_t_Vector_pop_back", _wrap_Size_t_Vector_pop_back, METH_VARARGS, NULL},
	 { "Size_t_Vector_erase", _wrap_Size_t_Vector_erase, METH_VARARGS, NULL},
	 { "new_Size_t_Vector", _wrap_new_Size_t_Vector, METH_VARARGS, NULL},
	 { "Size_t_Vector_push_back", _wrap_Size_t_Vector_push_back, METH_VARARGS, NULL},
	 { "Size_t_Vector_front", _wrap_Size_t_Vector_front, METH_VARARGS, NULL},
	 { "Size_t_Vector_back", _wrap_Size_t_Vector_back, METH_VARARGS, NULL},
	 { "Size_t_Vector_assign", _wrap_Size_t_Vector_assign, METH_VARARGS, NULL},
	 { "Size_t_Vector_resize", _wrap_Size_t_Vector_resize, METH_VARARGS, NULL},
	 { "Size_t_Vector_insert", _wrap_Size_t_Vector_insert, METH_VARARGS, NULL},
	 { "Size_t_Vector_reserve", _wrap_Size_t_Vector_reserve, METH_VARARGS, NULL},
	 { "Size_t_Vector_capacity", _wrap_Size_t_Vector_capacity, METH_VARARGS, NULL},
	 { "delete_Size_t_Vector", _wrap_delete_Size_t_Vector, METH_VARARGS, NULL},
	 { "Size_t_Vector_swigregister", Size_t_Vector_swigregister, METH_O, NULL},
	 { "Size_t_Vector_swiginit", Size_t_Vector_swiginit, METH_VARARGS, NULL},
	 { "DoubleVector_iterator", _wrap_DoubleVector_iterator, METH_VARARGS, NULL},
	 { "DoubleVector___nonzero__", _wrap_DoubleVector___nonzero__, METH_VARARGS, NULL},
	 { "DoubleVector___bool__", _wrap_DoubleVector___bool__, METH_VARARGS, NULL},
	 { "DoubleVector___len__", _wrap_DoubleVector___len__, METH_VARARGS, NULL},
	 { "DoubleVector___getslice__", _wrap_DoubleVector___getslice__, METH_VARARGS, NULL},
	 { "DoubleVector___setslice__", _wrap_DoubleVector___setslice__, METH_VARARGS, NULL},
	 { "DoubleVector___delslice__", _wrap_DoubleVector___delslice__, METH_VARARGS, NULL},
	 { "DoubleVector___delitem__", _wrap_DoubleVector___delitem__, METH_VARARGS, NULL},
	 { "DoubleVector___getitem__", _wrap_DoubleVector___getitem__, METH_VARARGS, NULL},
	 { "DoubleVector___setitem__", _wrap_DoubleVector___setitem__, METH_VARARGS, NULL},
	 { "DoubleVector_pop", _wrap_DoubleVector_pop, METH_VARARGS, NULL},
	 { "DoubleVector_append", _wrap_DoubleVector_append, METH_VARARGS, NULL},
	 { "DoubleVector_empty", _wrap_DoubleVector_empty, METH_VARARGS, NULL},
	 { "DoubleVector_size", _wrap_DoubleVector_size, METH_VARARGS, NULL},
	 { "DoubleVector_swap", _wrap_DoubleVector_swap, METH_VARARGS, NULL},
	 { "DoubleVector_begin", _wrap_DoubleVector_begin, METH_VARARGS, NULL},
	 { "DoubleVector_end", _wrap_DoubleVector_end, METH_VARARGS, NULL},
	 { "DoubleVector_rbegin", _wrap_DoubleVector_rbegin, METH_VARARGS, NULL},
	 { "DoubleVector_rend", _wrap_DoubleVector_rend, METH_VARARGS, NULL},
	 { "DoubleVector_clear", _wrap_DoubleVector_clear, METH_VARARGS, NULL},
	 { "DoubleVector_get_allocator", _wrap_DoubleVector_get_allocator, METH_VARARGS, NULL},
	 { "DoubleVector_pop_back", _wrap_DoubleVector_pop_back, METH_VARARGS, NULL},
	 { "DoubleVector_erase", _wrap_DoubleVector_erase, METH_VARARGS, NULL},
	 { "new_DoubleVector", _wrap_new_DoubleVector, METH_VARARGS, NULL},
	 { "DoubleVector_push_back", _wrap_DoubleVector_push_back, METH_VARARGS, NULL},
	 { "DoubleVector_front", _wrap_DoubleVector_front, METH_VARARGS, NULL},
	 { "DoubleVector_back", _wrap_DoubleVector_back, METH_VARARGS, NULL},
	 { "DoubleVector_assign", _wrap_DoubleVector_assign, METH_VARARGS, NULL},
	 { "DoubleVector_resize", _wrap_DoubleVector_resize, METH_VARARGS, NULL},
	 { "DoubleVector_insert", _wrap_DoubleVector_insert, METH_VARARGS, NULL},
	 { "DoubleVector_reserve", _wrap_DoubleVector_reserve, METH_VARARGS, NULL},
	 { "DoubleVector_capacity", _wrap_DoubleVector_capacity, METH_VARARGS, NULL},
	 { "delete_DoubleVector", _wrap_delete_DoubleVector, METH_VARARGS, NULL},
	 { "DoubleVector_swigregister", DoubleVector_swigregister, METH_O, NULL},
	 { "DoubleVector_swiginit", DoubleVector_swiginit, METH_VARARGS, NULL},
	 { "new_signed_direction", _wrap_new_signed_direction, METH_VARARGS, NULL},
	 { "signed_direction___mul__", _wrap_signed_direction___mul__, METH_VARARGS, NULL},
	 { "signed_direction___eq__", _wrap_signed_direction___eq__, METH_VARARGS, NULL},
	 { "signed_direction___ne__", _wrap_signed_direction___ne__, METH_VARARGS, NULL},
	 { "signed_direction_d_set", _wrap_signed_direction_d_set, METH_VARARGS, NULL},
	 { "signed_direction_d_get", _wrap_signed_direction_d_get, METH_VARARGS, NULL},
	 { "signed_direction_flipped_set", _wrap_signed_direction_flipped_set, METH_VARARGS, NULL},
	 { "signed_direction_flipped_get", _wrap_signed_direction_flipped_get, METH_VARARGS, NULL},
	 { "signed_direction_phase_set", _wrap_signed_direction_phase_set, METH_VARARGS, NULL},
	 { "signed_direction_phase_get", _wrap_signed_direction_phase_get, METH_VARARGS, NULL},
	 { "delete_signed_direction", _wrap_delete_signed_direction, METH_VARARGS, NULL},
	 { "signed_direction_swigregister", signed_direction_swigregister, METH_O, NULL},
	 { "signed_direction_swiginit", signed_direction_swiginit, METH_VARARGS, NULL},
	 { "number_of_directions", _wrap_number_of_directions, METH_VARARGS, NULL},
	 { "start_at_direction", _wrap_start_at_direction, METH_VARARGS, NULL},
	 { "stop_at_direction", _wrap_stop_at_direction, METH_VARARGS, NULL},
	 { "first_field_component", _wrap_first_field_component, METH_VARARGS, NULL},
	 { "flip", _wrap_flip, METH_VARARGS, NULL},
	 { "has_direction", _wrap_has_direction, METH_VARARGS, NULL},
	 { "has_field_direction", _wrap_has_field_direction, METH_VARARGS, NULL},
	 { "is_tm", _wrap_is_tm, METH_VARARGS, NULL},
	 { "abort", _wrap_abort, METH_VARARGS, NULL},
	 { "is_electric", _wrap_is_electric, METH_VARARGS, NULL},
	 { "is_magnetic", _wrap_is_magnetic, METH_VARARGS, NULL},
	 { "is_D", _wrap_is_D, METH_VARARGS, NULL},
	 { "is_B", _wrap_is_B, METH_VARARGS, NULL},
	 { "is_E_or_D", _wrap_is_E_or_D, METH_VARARGS, NULL},
	 { "is_H_or_B", _wrap_is_H_or_B, METH_VARARGS, NULL},
	 { "is_derived", _wrap_is_derived, METH_VARARGS, NULL},
	 { "is_poynting", _wrap_is_poynting, METH_VARARGS, NULL},
	 { "is_energydensity", _wrap_is_energydensity, METH_VARARGS, NULL},
	 { "meep_type", _wrap_meep_type, METH_VARARGS, NULL},
	 { "component_name", _wrap_component_name, METH_VARARGS, NULL},
	 { "direction_name", _wrap_direction_name, METH_VARARGS, NULL},
	 { "dimension_name", _wrap_dimension_name, METH_VARARGS, NULL},
	 { "component_index", _wrap_component_index, METH_VARARGS, NULL},
	 { "component_direction", _wrap_component_direction, METH_VARARGS, NULL},
	 { "direction_component", _wrap_direction_component, METH_VARARGS, NULL},
	 { "field_type_component", _wrap_field_type_component, METH_VARARGS, NULL},
	 { "coordinate_mismatch", _wrap_coordinate_mismatch, METH_VARARGS, NULL},
	 { "cycle_direction", _wrap_cycle_direction, METH_VARARGS, NULL},
	 { "cycle_component", _wrap_cycle_component, METH_VARARGS, NULL},
	 { "veccyl", _wrap_veccyl, METH_VARARGS, NULL},
	 { "zero_vec", _wrap_zero_vec, METH_VARARGS, NULL},
	 { "new_vec_dim", _wrap_new_vec_dim, METH_VARARGS, NULL},
	 { "new_vec_dim_val", _wrap_new_vec_dim_val, METH_VARARGS, NULL},
	 { "new__vec", _wrap_new__vec, METH_VARARGS, NULL},
	 { "delete_vec", _wrap_delete_vec, METH_VARARGS, NULL},
	 { "vec___add__", _wrap_vec___add__, METH_VARARGS, NULL},
	 { "vec___iadd__", _wrap_vec___iadd__, METH_VARARGS, NULL},
	 { "vec___sub__", _wrap_vec___sub__, METH_VARARGS, NULL},
	 { "vec___neg__", _wrap_vec___neg__, METH_VARARGS, NULL},
	 { "vec___isub__", _wrap_vec___isub__, METH_VARARGS, NULL},
	 { "vec___ne__", _wrap_vec___ne__, METH_VARARGS, NULL},
	 { "vec___eq__", _wrap_vec___eq__, METH_VARARGS, NULL},
	 { "vec_round_float", _wrap_vec_round_float, METH_VARARGS, NULL},
	 { "vec___mul__", _wrap_vec___mul__, METH_VARARGS, NULL},
	 { "vec___truediv__", _wrap_vec___truediv__, METH_VARARGS, NULL},
	 { "vec___and__", _wrap_vec___and__, METH_VARARGS, NULL},
	 { "vec_dim_set", _wrap_vec_dim_set, METH_VARARGS, NULL},
	 { "vec_dim_get", _wrap_vec_dim_get, METH_VARARGS, NULL},
	 { "vec_r", _wrap_vec_r, METH_VARARGS, NULL},
	 { "vec_x", _wrap_vec_x, METH_VARARGS, NULL},
	 { "vec_y", _wrap_vec_y, METH_VARARGS, NULL},
	 { "vec_z", _wrap_vec_z, METH_VARARGS, NULL},
	 { "vec_in_direction", _wrap_vec_in_direction, METH_VARARGS, NULL},
	 { "vec_set_direction", _wrap_vec_set_direction, METH_VARARGS, NULL},
	 { "vec_project_to_boundary", _wrap_vec_project_to_boundary, METH_VARARGS, NULL},
	 { "vec___repr__", _wrap_vec___repr__, METH_VARARGS, NULL},
	 { "vec_swigregister", vec_swigregister, METH_O, NULL},
	 { "vec_abs", _wrap_vec_abs, METH_VARARGS, NULL},
	 { "one_vec", _wrap_one_vec, METH_VARARGS, NULL},
	 { "unit_vec", _wrap_unit_vec, METH_VARARGS, NULL},
	 { "clean_vec", _wrap_clean_vec, METH_VARARGS, NULL},
	 { "iveccyl", _wrap_iveccyl, METH_VARARGS, NULL},
	 { "zero_ivec", _wrap_zero_ivec, METH_VARARGS, NULL},
	 { "one_ivec", _wrap_one_ivec, METH_VARARGS, NULL},
	 { "new_ivec", _wrap_new_ivec, METH_VARARGS, NULL},
	 { "delete_ivec", _wrap_delete_ivec, METH_VARARGS, NULL},
	 { "ivec_yucky_val", _wrap_ivec_yucky_val, METH_VARARGS, NULL},
	 { "ivec___add__", _wrap_ivec___add__, METH_VARARGS, NULL},
	 { "ivec___iadd__", _wrap_ivec___iadd__, METH_VARARGS, NULL},
	 { "ivec___sub__", _wrap_ivec___sub__, METH_VARARGS, NULL},
	 { "ivec___neg__", _wrap_ivec___neg__, METH_VARARGS, NULL},
	 { "ivec___isub__", _wrap_ivec___isub__, METH_VARARGS, NULL},
	 { "ivec___ne__", _wrap_ivec___ne__, METH_VARARGS, NULL},
	 { "ivec___eq__", _wrap_ivec___eq__, METH_VARARGS, NULL},
	 { "ivec___le__", _wrap_ivec___le__, METH_VARARGS, NULL},
	 { "ivec___ge__", _wrap_ivec___ge__, METH_VARARGS, NULL},
	 { "ivec___lt__", _wrap_ivec___lt__, METH_VARARGS, NULL},
	 { "ivec___gt__", _wrap_ivec___gt__, METH_VARARGS, NULL},
	 { "ivec___truediv__", _wrap_ivec___truediv__, METH_VARARGS, NULL},
	 { "ivec___mul__", _wrap_ivec___mul__, METH_VARARGS, NULL},
	 { "ivec_dim_set", _wrap_ivec_dim_set, METH_VARARGS, NULL},
	 { "ivec_dim_get", _wrap_ivec_dim_get, METH_VARARGS, NULL},
	 { "ivec_r", _wrap_ivec_r, METH_VARARGS, NULL},
	 { "ivec_x", _wrap_ivec_x, METH_VARARGS, NULL},
	 { "ivec_y", _wrap_ivec_y, METH_VARARGS, NULL},
	 { "ivec_z", _wrap_ivec_z, METH_VARARGS, NULL},
	 { "ivec_in_direction", _wrap_ivec_in_direction, METH_VARARGS, NULL},
	 { "ivec_set_direction", _wrap_ivec_set_direction, METH_VARARGS, NULL},
	 { "ivec_round_down_to_even", _wrap_ivec_round_down_to_even, METH_VARARGS, NULL},
	 { "ivec___repr__", _wrap_ivec___repr__, METH_VARARGS, NULL},
	 { "ivec_swigregister", ivec_swigregister, METH_O, NULL},
	 { "ivec_swiginit", ivec_swiginit, METH_VARARGS, NULL},
	 { "unit_ivec", _wrap_unit_ivec, METH_VARARGS, NULL},
	 { "vec_max", _wrap_vec_max, METH_VARARGS, NULL},
	 { "vec_min", _wrap_vec_min, METH_VARARGS, NULL},
	 { "volume_dim_set", _wrap_volume_dim_set, METH_VARARGS, NULL},
	 { "volume_dim_get", _wrap_volume_dim_get, METH_VARARGS, NULL},
	 { "new_volume", _wrap_new_volume, METH_VARARGS, NULL},
	 { "volume_set_direction_min", _wrap_volume_set_direction_min, METH_VARARGS, NULL},
	 { "volume_set_direction_max", _wrap_volume_set_direction_max, METH_VARARGS, NULL},
	 { "volume_in_direction_min", _wrap_volume_in_direction_min, METH_VARARGS, NULL},
	 { "volume_in_direction_max", _wrap_volume_in_direction_max, METH_VARARGS, NULL},
	 { "volume_in_direction", _wrap_volume_in_direction, METH_VARARGS, NULL},
	 { "volume_computational_volume", _wrap_volume_computational_volume, METH_VARARGS, NULL},
	 { "volume_integral_volume", _wrap_volume_integral_volume, METH_VARARGS, NULL},
	 { "volume_full_volume", _wrap_volume_full_volume, METH_VARARGS, NULL},
	 { "volume_center", _wrap_volume_center, METH_VARARGS, NULL},
	 { "volume_diameter", _wrap_volume_diameter, METH_VARARGS, NULL},
	 { "volume_contains", _wrap_volume_contains, METH_VARARGS, NULL},
	 { "volume_intersect_with", _wrap_volume_intersect_with, METH_VARARGS, NULL},
	 { "volume___and__", _wrap_volume___and__, METH_VARARGS, NULL},
	 { "volume___or__", _wrap_volume___or__, METH_VARARGS, NULL},
	 { "volume___add__", _wrap_volume___add__, METH_VARARGS, NULL},
	 { "volume___iadd__", _wrap_volume___iadd__, METH_VARARGS, NULL},
	 { "volume___sub__", _wrap_volume___sub__, METH_VARARGS, NULL},
	 { "volume___isub__", _wrap_volume___isub__, METH_VARARGS, NULL},
	 { "volume___eq__", _wrap_volume___eq__, METH_VARARGS, NULL},
	 { "volume___ne__", _wrap_volume___ne__, METH_VARARGS, NULL},
	 { "volume_round_float", _wrap_volume_round_float, METH_VARARGS, NULL},
	 { "volume_intersects", _wrap_volume_intersects, METH_VARARGS, NULL},
	 { "volume___contains__", _wrap_volume___contains__, METH_VARARGS, NULL},
	 { "volume_get_min_corner", _wrap_volume_get_min_corner, METH_VARARGS, NULL},
	 { "volume_get_max_corner", _wrap_volume_get_max_corner, METH_VARARGS, NULL},
	 { "volume_normal_direction", _wrap_volume_normal_direction, METH_VARARGS, NULL},
	 { "volume___repr__", _wrap_volume___repr__, METH_VARARGS, NULL},
	 { "delete_volume", _wrap_delete_volume, METH_VARARGS, NULL},
	 { "volume_swigregister", volume_swigregister, METH_O, NULL},
	 { "volume_swiginit", volume_swiginit, METH_VARARGS, NULL},
	 { "volcyl", _wrap_volcyl, METH_VARARGS, NULL},
	 { "volone", _wrap_volone, METH_VARARGS, NULL},
	 { "vol1d", _wrap_vol1d, METH_VARARGS, NULL},
	 { "voltwo", _wrap_voltwo, METH_VARARGS, NULL},
	 { "vol2d", _wrap_vol2d, METH_VARARGS, NULL},
	 { "vol3d", _wrap_vol3d, METH_VARARGS, NULL},
	 { "new_grid_volume", _wrap_new_grid_volume, METH_VARARGS, NULL},
	 { "grid_volume_subvolume", _wrap_grid_volume_subvolume, METH_VARARGS, NULL},
	 { "grid_volume_init_subvolume", _wrap_grid_volume_init_subvolume, METH_VARARGS, NULL},
	 { "grid_volume_dim_set", _wrap_grid_volume_dim_set, METH_VARARGS, NULL},
	 { "grid_volume_dim_get", _wrap_grid_volume_dim_get, METH_VARARGS, NULL},
	 { "grid_volume_a_set", _wrap_grid_volume_a_set, METH_VARARGS, NULL},
	 { "grid_volume_a_get", _wrap_grid_volume_a_get, METH_VARARGS, NULL},
	 { "grid_volume_inva_set", _wrap_grid_volume_inva_set, METH_VARARGS, NULL},
	 { "grid_volume_inva_get", _wrap_grid_volume_inva_get, METH_VARARGS, NULL},
	 { "grid_volume_print_grid_volume", _wrap_grid_volume_print_grid_volume, METH_VARARGS, NULL},
	 { "grid_volume_stride", _wrap_grid_volume_stride, METH_VARARGS, NULL},
	 { "grid_volume_num_direction", _wrap_grid_volume_num_direction, METH_VARARGS, NULL},
	 { "grid_volume_yucky_num", _wrap_grid_volume_yucky_num, METH_VARARGS, NULL},
	 { "grid_volume_yucky_direction", _wrap_grid_volume_yucky_direction, METH_VARARGS, NULL},
	 { "grid_volume_set_num_direction", _wrap_grid_volume_set_num_direction, METH_VARARGS, NULL},
	 { "grid_volume_nr", _wrap_grid_volume_nr, METH_VARARGS, NULL},
	 { "grid_volume_nx", _wrap_grid_volume_nx, METH_VARARGS, NULL},
	 { "grid_volume_ny", _wrap_grid_volume_ny, METH_VARARGS, NULL},
	 { "grid_volume_nz", _wrap_grid_volume_nz, METH_VARARGS, NULL},
	 { "grid_volume_has_field", _wrap_grid_volume_has_field, METH_VARARGS, NULL},
	 { "grid_volume_has_boundary", _wrap_grid_volume_has_boundary, METH_VARARGS, NULL},
	 { "grid_volume_dr", _wrap_grid_volume_dr, METH_VARARGS, NULL},
	 { "grid_volume_dx", _wrap_grid_volume_dx, METH_VARARGS, NULL},
	 { "grid_volume_dy", _wrap_grid_volume_dy, METH_VARARGS, NULL},
	 { "grid_volume_dz", _wrap_grid_volume_dz, METH_VARARGS, NULL},
	 { "grid_volume_ntot", _wrap_grid_volume_ntot, METH_VARARGS, NULL},
	 { "grid_volume_nowned_min", _wrap_grid_volume_nowned_min, METH_VARARGS, NULL},
	 { "grid_volume_nowned", _wrap_grid_volume_nowned, METH_VARARGS, NULL},
	 { "grid_volume___getitem__", _wrap_grid_volume___getitem__, METH_VARARGS, NULL},
	 { "grid_volume_index", _wrap_grid_volume_index, METH_VARARGS, NULL},
	 { "grid_volume_round_vec", _wrap_grid_volume_round_vec, METH_VARARGS, NULL},
	 { "grid_volume_interpolate", _wrap_grid_volume_interpolate, METH_VARARGS, NULL},
	 { "grid_volume_dV", _wrap_grid_volume_dV, METH_VARARGS, NULL},
	 { "grid_volume_intersect_with", _wrap_grid_volume_intersect_with, METH_VARARGS, NULL},
	 { "grid_volume_rmin", _wrap_grid_volume_rmin, METH_VARARGS, NULL},
	 { "grid_volume_rmax", _wrap_grid_volume_rmax, METH_VARARGS, NULL},
	 { "grid_volume_xmin", _wrap_grid_volume_xmin, METH_VARARGS, NULL},
	 { "grid_volume_xmax", _wrap_grid_volume_xmax, METH_VARARGS, NULL},
	 { "grid_volume_ymin", _wrap_grid_volume_ymin, METH_VARARGS, NULL},
	 { "grid_volume_ymax", _wrap_grid_volume_ymax, METH_VARARGS, NULL},
	 { "grid_volume_zmin", _wrap_grid_volume_zmin, METH_VARARGS, NULL},
	 { "grid_volume_zmax", _wrap_grid_volume_zmax, METH_VARARGS, NULL},
	 { "grid_volume_center", _wrap_grid_volume_center, METH_VARARGS, NULL},
	 { "grid_volume_icenter", _wrap_grid_volume_icenter, METH_VARARGS, NULL},
	 { "grid_volume_loc", _wrap_grid_volume_loc, METH_VARARGS, NULL},
	 { "grid_volume_loc_at_resolution", _wrap_grid_volume_loc_at_resolution, METH_VARARGS, NULL},
	 { "grid_volume_ntot_at_resolution", _wrap_grid_volume_ntot_at_resolution, METH_VARARGS, NULL},
	 { "grid_volume_iloc", _wrap_grid_volume_iloc, METH_VARARGS, NULL},
	 { "grid_volume_surface_area", _wrap_grid_volume_surface_area, METH_VARARGS, NULL},
	 { "grid_volume_yee_index", _wrap_grid_volume_yee_index, METH_VARARGS, NULL},
	 { "grid_volume_yee_shift", _wrap_grid_volume_yee_shift, METH_VARARGS, NULL},
	 { "grid_volume_eps_component", _wrap_grid_volume_eps_component, METH_VARARGS, NULL},
	 { "grid_volume_yee2cent_offsets", _wrap_grid_volume_yee2cent_offsets, METH_VARARGS, NULL},
	 { "grid_volume_cent2yee_offsets", _wrap_grid_volume_cent2yee_offsets, METH_VARARGS, NULL},
	 { "grid_volume_boundary_location", _wrap_grid_volume_boundary_location, METH_VARARGS, NULL},
	 { "grid_volume_big_corner", _wrap_grid_volume_big_corner, METH_VARARGS, NULL},
	 { "grid_volume_little_corner", _wrap_grid_volume_little_corner, METH_VARARGS, NULL},
	 { "grid_volume_corner", _wrap_grid_volume_corner, METH_VARARGS, NULL},
	 { "grid_volume_contains", _wrap_grid_volume_contains, METH_VARARGS, NULL},
	 { "grid_volume_little_owned_corner0", _wrap_grid_volume_little_owned_corner0, METH_VARARGS, NULL},
	 { "grid_volume_little_owned_corner", _wrap_grid_volume_little_owned_corner, METH_VARARGS, NULL},
	 { "grid_volume_big_owned_corner", _wrap_grid_volume_big_owned_corner, METH_VARARGS, NULL},
	 { "grid_volume_owns", _wrap_grid_volume_owns, METH_VARARGS, NULL},
	 { "grid_volume_surroundings", _wrap_grid_volume_surroundings, METH_VARARGS, NULL},
	 { "grid_volume_interior", _wrap_grid_volume_interior, METH_VARARGS, NULL},
	 { "grid_volume_get_boundary_icorners", _wrap_grid_volume_get_boundary_icorners, METH_VARARGS, NULL},
	 { "grid_volume_split_at_fraction", _wrap_grid_volume_split_at_fraction, METH_VARARGS, NULL},
	 { "grid_volume_get_cost", _wrap_grid_volume_get_cost, METH_VARARGS, NULL},
	 { "grid_volume_halve", _wrap_grid_volume_halve, METH_VARARGS, NULL},
	 { "grid_volume_pad_self", _wrap_grid_volume_pad_self, METH_VARARGS, NULL},
	 { "grid_volume_pad", _wrap_grid_volume_pad, METH_VARARGS, NULL},
	 { "grid_volume_iyee_shift", _wrap_grid_volume_iyee_shift, METH_VARARGS, NULL},
	 { "grid_volume_get_origin", _wrap_grid_volume_get_origin, METH_VARARGS, NULL},
	 { "grid_volume_shift_origin", _wrap_grid_volume_shift_origin, METH_VARARGS, NULL},
	 { "grid_volume_set_origin", _wrap_grid_volume_set_origin, METH_VARARGS, NULL},
	 { "grid_volume_center_origin", _wrap_grid_volume_center_origin, METH_VARARGS, NULL},
	 { "grid_volume_origin_in_direction", _wrap_grid_volume_origin_in_direction, METH_VARARGS, NULL},
	 { "grid_volume_iorigin_in_direction", _wrap_grid_volume_iorigin_in_direction, METH_VARARGS, NULL},
	 { "grid_volume_origin_r", _wrap_grid_volume_origin_r, METH_VARARGS, NULL},
	 { "grid_volume_origin_x", _wrap_grid_volume_origin_x, METH_VARARGS, NULL},
	 { "grid_volume_origin_y", _wrap_grid_volume_origin_y, METH_VARARGS, NULL},
	 { "grid_volume_origin_z", _wrap_grid_volume_origin_z, METH_VARARGS, NULL},
	 { "grid_volume_get_split_costs", _wrap_grid_volume_get_split_costs, METH_VARARGS, NULL},
	 { "grid_volume_tile_split", _wrap_grid_volume_tile_split, METH_VARARGS, NULL},
	 { "grid_volume_find_best_split", _wrap_grid_volume_find_best_split, METH_VARARGS, NULL},
	 { "grid_volume___repr__", _wrap_grid_volume___repr__, METH_VARARGS, NULL},
	 { "delete_grid_volume", _wrap_delete_grid_volume, METH_VARARGS, NULL},
	 { "grid_volume_swigregister", grid_volume_swigregister, METH_O, NULL},
	 { "grid_volume_swiginit", grid_volume_swiginit, METH_VARARGS, NULL},
	 { "identity", _wrap_identity, METH_VARARGS, NULL},
	 { "rotate4", _wrap_rotate4, METH_VARARGS, NULL},
	 { "rotate2", _wrap_rotate2, METH_VARARGS, NULL},
	 { "mirror", _wrap_mirror, METH_VARARGS, NULL},
	 { "r_to_minus_r_symmetry", _wrap_r_to_minus_r_symmetry, METH_VARARGS, NULL},
	 { "new_symmetry", _wrap_new_symmetry, METH_VARARGS, NULL},
	 { "delete_symmetry", _wrap_delete_symmetry, METH_VARARGS, NULL},
	 { "symmetry_transform_unshifted", _wrap_symmetry_transform_unshifted, METH_VARARGS, NULL},
	 { "symmetry_transform", _wrap_symmetry_transform, METH_VARARGS, NULL},
	 { "symmetry_phase_shift", _wrap_symmetry_phase_shift, METH_VARARGS, NULL},
	 { "symmetry_multiplicity", _wrap_symmetry_multiplicity, METH_VARARGS, NULL},
	 { "symmetry_is_primitive", _wrap_symmetry_is_primitive, METH_VARARGS, NULL},
	 { "symmetry_symmetry_reduce", _wrap_symmetry_symmetry_reduce, METH_VARARGS, NULL},
	 { "symmetry___add__", _wrap_symmetry___add__, METH_VARARGS, NULL},
	 { "symmetry___mul__", _wrap_symmetry___mul__, METH_VARARGS, NULL},
	 { "symmetry___sub__", _wrap_symmetry___sub__, METH_VARARGS, NULL},
	 { "symmetry___neg__", _wrap_symmetry___neg__, METH_VARARGS, NULL},
	 { "symmetry_symmetry_assign", _wrap_symmetry_symmetry_assign, METH_VARARGS, NULL},
	 { "symmetry___eq__", _wrap_symmetry___eq__, METH_VARARGS, NULL},
	 { "symmetry___ne__", _wrap_symmetry___ne__, METH_VARARGS, NULL},
	 { "symmetry_i_symmetry_point_set", _wrap_symmetry_i_symmetry_point_set, METH_VARARGS, NULL},
	 { "symmetry_i_symmetry_point_get", _wrap_symmetry_i_symmetry_point_get, METH_VARARGS, NULL},
	 { "symmetry_swigregister", symmetry_swigregister, METH_O, NULL},
	 { "symmetry_swiginit", symmetry_swiginit, METH_VARARGS, NULL},
	 { "delete_volume_list", _wrap_delete_volume_list, METH_VARARGS, NULL},
	 { "new_volume_list", _wrap_new_volume_list, METH_VARARGS, NULL},
	 { "volume_list_v_set", _wrap_volume_list_v_set, METH_VARARGS, NULL},
	 { "volume_list_v_get", _wrap_volume_list_v_get, METH_VARARGS, NULL},
	 { "volume_list_c_set", _wrap_volume_list_c_set, METH_VARARGS, NULL},
	 { "volume_list_c_get", _wrap_volume_list_c_get, METH_VARARGS, NULL},
	 { "volume_list_weight_set", _wrap_volume_list_weight_set, METH_VARARGS, NULL},
	 { "volume_list_weight_get", _wrap_volume_list_weight_get, METH_VARARGS, NULL},
	 { "volume_list_next_set", _wrap_volume_list_next_set, METH_VARARGS, NULL},
	 { "volume_list_next_get", _wrap_volume_list_next_get, METH_VARARGS, NULL},
	 { "volume_list_swigregister", volume_list_swigregister, METH_O, NULL},
	 { "volume_list_swiginit", volume_list_swiginit, METH_VARARGS, NULL},
	 { "cdouble", _wrap_cdouble, METH_VARARGS, NULL},
	 { "matrix_invert", _wrap_matrix_invert, METH_VARARGS, NULL},
	 { "linspace", _wrap_linspace, METH_VARARGS, NULL},
	 { "pml_quadratic_profile", _wrap_pml_quadratic_profile, METH_VARARGS, NULL},
	 { "new_susceptibility", _wrap_new_susceptibility, METH_VARARGS, NULL},
	 { "susceptibility_clone", _wrap_susceptibility_clone, METH_VARARGS, NULL},
	 { "delete_susceptibility", _wrap_delete_susceptibility, METH_VARARGS, NULL},
	 { "susceptibility_get_id", _wrap_susceptibility_get_id, METH_VARARGS, NULL},
	 { "susceptibility___eq__", _wrap_susceptibility___eq__, METH_VARARGS, NULL},
	 { "susceptibility_chi1", _wrap_susceptibility_chi1, METH_VARARGS, NULL},
	 { "susceptibility_update_P", _wrap_susceptibility_update_P, METH_VARARGS, NULL},
	 { "susceptibility_subtract_P", _wrap_susceptibility_subtract_P, METH_VARARGS, NULL},
	 { "susceptibility_needs_P", _wrap_susceptibility_needs_P, METH_VARARGS, NULL},
	 { "susceptibility_needs_W_notowned", _wrap_susceptibility_needs_W_notowned, METH_VARARGS, NULL},
	 { "susceptibility_needs_W_prev", _wrap_susceptibility_needs_W_prev, METH_VARARGS, NULL},
	 { "susceptibility_new_internal_data", _wrap_susceptibility_new_internal_data, METH_VARARGS, NULL},
	 { "susceptibility_delete_internal_data", _wrap_susceptibility_delete_internal_data, METH_VARARGS, NULL},
	 { "susceptibility_init_internal_data", _wrap_susceptibility_init_internal_data, METH_VARARGS, NULL},
	 { "susceptibility_copy_internal_data", _wrap_susceptibility_copy_internal_data, METH_VARARGS, NULL},
	 { "susceptibility_num_internal_notowned_needed", _wrap_susceptibility_num_internal_notowned_needed, METH_VARARGS, NULL},
	 { "susceptibility_internal_notowned_ptr", _wrap_susceptibility_internal_notowned_ptr, METH_VARARGS, NULL},
	 { "susceptibility_num_cinternal_notowned_needed", _wrap_susceptibility_num_cinternal_notowned_needed, METH_VARARGS, NULL},
	 { "susceptibility_cinternal_notowned_ptr", _wrap_susceptibility_cinternal_notowned_ptr, METH_VARARGS, NULL},
	 { "susceptibility_dump_params", _wrap_susceptibility_dump_params, METH_VARARGS, NULL},
	 { "susceptibility_get_num_params", _wrap_susceptibility_get_num_params, METH_VARARGS, NULL},
	 { "susceptibility_set_id", _wrap_susceptibility_set_id, METH_VARARGS, NULL},
	 { "susceptibility_next_set", _wrap_susceptibility_next_set, METH_VARARGS, NULL},
	 { "susceptibility_next_get", _wrap_susceptibility_next_get, METH_VARARGS, NULL},
	 { "susceptibility_ntot_set", _wrap_susceptibility_ntot_set, METH_VARARGS, NULL},
	 { "susceptibility_ntot_get", _wrap_susceptibility_ntot_get, METH_VARARGS, NULL},
	 { "susceptibility_sigma_set", _wrap_susceptibility_sigma_set, METH_VARARGS, NULL},
	 { "susceptibility_sigma_get", _wrap_susceptibility_sigma_get, METH_VARARGS, NULL},
	 { "susceptibility_trivial_sigma_set", _wrap_susceptibility_trivial_sigma_set, METH_VARARGS, NULL},
	 { "susceptibility_trivial_sigma_get", _wrap_susceptibility_trivial_sigma_get, METH_VARARGS, NULL},
	 { "susceptibility_swigregister", susceptibility_swigregister, METH_O, NULL},
	 { "susceptibility_swiginit", susceptibility_swiginit, METH_VARARGS, NULL},
	 { "new_lorentzian_susceptibility", _wrap_new_lorentzian_susceptibility, METH_VARARGS, NULL},
	 { "lorentzian_susceptibility_clone", _wrap_lorentzian_susceptibility_clone, METH_VARARGS, NULL},
	 { "delete_lorentzian_susceptibility", _wrap_delete_lorentzian_susceptibility, METH_VARARGS, NULL},
	 { "lorentzian_susceptibility_chi1", _wrap_lorentzian_susceptibility_chi1, METH_VARARGS, NULL},
	 { "lorentzian_susceptibility_update_P", _wrap_lorentzian_susceptibility_update_P, METH_VARARGS, NULL},
	 { "lorentzian_susceptibility_subtract_P", _wrap_lorentzian_susceptibility_subtract_P, METH_VARARGS, NULL},
	 { "lorentzian_susceptibility_new_internal_data", _wrap_lorentzian_susceptibility_new_internal_data, METH_VARARGS, NULL},
	 { "lorentzian_susceptibility_init_internal_data", _wrap_lorentzian_susceptibility_init_internal_data, METH_VARARGS, NULL},
	 { "lorentzian_susceptibility_copy_internal_data", _wrap_lorentzian_susceptibility_copy_internal_data, METH_VARARGS, NULL},
	 { "lorentzian_susceptibility_num_cinternal_notowned_needed", _wrap_lorentzian_susceptibility_num_cinternal_notowned_needed, METH_VARARGS, NULL},
	 { "lorentzian_susceptibility_cinternal_notowned_ptr", _wrap_lorentzian_susceptibility_cinternal_notowned_ptr, METH_VARARGS, NULL},
	 { "lorentzian_susceptibility_dump_params", _wrap_lorentzian_susceptibility_dump_params, METH_VARARGS, NULL},
	 { "lorentzian_susceptibility_get_num_params", _wrap_lorentzian_susceptibility_get_num_params, METH_VARARGS, NULL},
	 { "lorentzian_susceptibility_swigregister", lorentzian_susceptibility_swigregister, METH_O, NULL},
	 { "lorentzian_susceptibility_swiginit", lorentzian_susceptibility_swiginit, METH_VARARGS, NULL},
	 { "new_noisy_lorentzian_susceptibility", _wrap_new_noisy_lorentzian_susceptibility, METH_VARARGS, NULL},
	 { "noisy_lorentzian_susceptibility_clone", _wrap_noisy_lorentzian_susceptibility_clone, METH_VARARGS, NULL},
	 { "noisy_lorentzian_susceptibility_update_P", _wrap_noisy_lorentzian_susceptibility_update_P, METH_VARARGS, NULL},
	 { "noisy_lorentzian_susceptibility_dump_params", _wrap_noisy_lorentzian_susceptibility_dump_params, METH_VARARGS, NULL},
	 { "noisy_lorentzian_susceptibility_get_num_params", _wrap_noisy_lorentzian_susceptibility_get_num_params, METH_VARARGS, NULL},
	 { "delete_noisy_lorentzian_susceptibility", _wrap_delete_noisy_lorentzian_susceptibility, METH_VARARGS, NULL},
	 { "noisy_lorentzian_susceptibility_swigregister", noisy_lorentzian_susceptibility_swigregister, METH_O, NULL},
	 { "noisy_lorentzian_susceptibility_swiginit", noisy_lorentzian_susceptibility_swiginit, METH_VARARGS, NULL},
	 { "new_gyrotropic_susceptibility", _wrap_new_gyrotropic_susceptibility, METH_VARARGS, NULL},
	 { "gyrotropic_susceptibility_clone", _wrap_gyrotropic_susceptibility_clone, METH_VARARGS, NULL},
	 { "gyrotropic_susceptibility_new_internal_data", _wrap_gyrotropic_susceptibility_new_internal_data, METH_VARARGS, NULL},
	 { "gyrotropic_susceptibility_init_internal_data", _wrap_gyrotropic_susceptibility_init_internal_data, METH_VARARGS, NULL},
	 { "gyrotropic_susceptibility_copy_internal_data", _wrap_gyrotropic_susceptibility_copy_internal_data, METH_VARARGS, NULL},
	 { "gyrotropic_susceptibility_needs_P", _wrap_gyrotropic_susceptibility_needs_P, METH_VARARGS, NULL},
	 { "gyrotropic_susceptibility_update_P", _wrap_gyrotropic_susceptibility_update_P, METH_VARARGS, NULL},
	 { "gyrotropic_susceptibility_subtract_P", _wrap_gyrotropic_susceptibility_subtract_P, METH_VARARGS, NULL},
	 { "gyrotropic_susceptibility_num_cinternal_notowned_needed", _wrap_gyrotropic_susceptibility_num_cinternal_notowned_needed, METH_VARARGS, NULL},
	 { "gyrotropic_susceptibility_cinternal_notowned_ptr", _wrap_gyrotropic_susceptibility_cinternal_notowned_ptr, METH_VARARGS, NULL},
	 { "gyrotropic_susceptibility_dump_params", _wrap_gyrotropic_susceptibility_dump_params, METH_VARARGS, NULL},
	 { "gyrotropic_susceptibility_get_num_params", _wrap_gyrotropic_susceptibility_get_num_params, METH_VARARGS, NULL},
	 { "gyrotropic_susceptibility_needs_W_notowned", _wrap_gyrotropic_susceptibility_needs_W_notowned, METH_VARARGS, NULL},
	 { "delete_gyrotropic_susceptibility", _wrap_delete_gyrotropic_susceptibility, METH_VARARGS, NULL},
	 { "gyrotropic_susceptibility_swigregister", gyrotropic_susceptibility_swigregister, METH_O, NULL},
	 { "gyrotropic_susceptibility_swiginit", gyrotropic_susceptibility_swiginit, METH_VARARGS, NULL},
	 { "new_multilevel_susceptibility", _wrap_new_multilevel_susceptibility, METH_VARARGS, NULL},
	 { "multilevel_susceptibility_clone", _wrap_multilevel_susceptibility_clone, METH_VARARGS, NULL},
	 { "delete_multilevel_susceptibility", _wrap_delete_multilevel_susceptibility, METH_VARARGS, NULL},
	 { "multilevel_susceptibility_update_P", _wrap_multilevel_susceptibility_update_P, METH_VARARGS, NULL},
	 { "multilevel_susceptibility_subtract_P", _wrap_multilevel_susceptibility_subtract_P, METH_VARARGS, NULL},
	 { "multilevel_susceptibility_new_internal_data", _wrap_multilevel_susceptibility_new_internal_data, METH_VARARGS, NULL},
	 { "multilevel_susceptibility_init_internal_data", _wrap_multilevel_susceptibility_init_internal_data, METH_VARARGS, NULL},
	 { "multilevel_susceptibility_copy_internal_data", _wrap_multilevel_susceptibility_copy_internal_data, METH_VARARGS, NULL},
	 { "multilevel_susceptibility_delete_internal_data", _wrap_multilevel_susceptibility_delete_internal_data, METH_VARARGS, NULL},
	 { "multilevel_susceptibility_num_cinternal_notowned_needed", _wrap_multilevel_susceptibility_num_cinternal_notowned_needed, METH_VARARGS, NULL},
	 { "multilevel_susceptibility_cinternal_notowned_ptr", _wrap_multilevel_susceptibility_cinternal_notowned_ptr, METH_VARARGS, NULL},
	 { "multilevel_susceptibility_needs_W_notowned", _wrap_multilevel_susceptibility_needs_W_notowned, METH_VARARGS, NULL},
	 { "multilevel_susceptibility_needs_W_prev", _wrap_multilevel_susceptibility_needs_W_prev, METH_VARARGS, NULL},
	 { "multilevel_susceptibility_swigregister", multilevel_susceptibility_swigregister, METH_O, NULL},
	 { "multilevel_susceptibility_swiginit", multilevel_susceptibility_swiginit, METH_VARARGS, NULL},
	 { "new_h5file", _wrap_new_h5file, METH_VARARGS, NULL},
	 { "delete_h5file", _wrap_delete_h5file, METH_VARARGS, NULL},
	 { "h5file_ok", _wrap_h5file_ok, METH_VARARGS, NULL},
	 { "h5file_read", _wrap_h5file_read, METH_VARARGS, NULL},
	 { "h5file_write", _wrap_h5file_write, METH_VARARGS, NULL},
	 { "h5file_create_data", _wrap_h5file_create_data, METH_VARARGS, NULL},
	 { "h5file_extend_data", _wrap_h5file_extend_data, METH_VARARGS, NULL},
	 { "h5file_create_or_extend_data", _wrap_h5file_create_or_extend_data, METH_VARARGS, NULL},
	 { "h5file_write_chunk", _wrap_h5file_write_chunk, METH_VARARGS, NULL},
	 { "h5file_done_writing_chunks", _wrap_h5file_done_writing_chunks, METH_VARARGS, NULL},
	 { "h5file_read_size", _wrap_h5file_read_size, METH_VARARGS, NULL},
	 { "h5file_read_chunk", _wrap_h5file_read_chunk, METH_VARARGS, NULL},
	 { "h5file_remove", _wrap_h5file_remove, METH_VARARGS, NULL},
	 { "h5file_remove_data", _wrap_h5file_remove_data, METH_VARARGS, NULL},
	 { "h5file_file_name", _wrap_h5file_file_name, METH_VARARGS, NULL},
	 { "h5file_prevent_deadlock", _wrap_h5file_prevent_deadlock, METH_VARARGS, NULL},
	 { "h5file_dataset_exists", _wrap_h5file_dataset_exists, METH_VARARGS, NULL},
	 { "h5file_extending_set", _wrap_h5file_extending_set, METH_VARARGS, NULL},
	 { "h5file_extending_get", _wrap_h5file_extending_get, METH_VARARGS, NULL},
	 { "h5file_get_extending", _wrap_h5file_get_extending, METH_VARARGS, NULL},
	 { "h5file_swigregister", h5file_swigregister, METH_O, NULL},
	 { "h5file_swiginit", h5file_swiginit, METH_VARARGS, NULL},
	 { "new_material_function", _wrap_new_material_function, METH_VARARGS, NULL},
	 { "delete_material_function", _wrap_delete_material_function, METH_VARARGS, NULL},
	 { "material_function_set_volume", _wrap_material_function_set_volume, METH_VARARGS, NULL},
	 { "material_function_unset_volume", _wrap_material_function_unset_volume, METH_VARARGS, NULL},
	 { "material_function_chi1p1", _wrap_material_function_chi1p1, METH_VARARGS, NULL},
	 { "material_function_eps", _wrap_material_function_eps, METH_VARARGS, NULL},
	 { "material_function_has_mu", _wrap_material_function_has_mu, METH_VARARGS, NULL},
	 { "material_function_mu", _wrap_material_function_mu, METH_VARARGS, NULL},
	 { "material_function_has_conductivity", _wrap_material_function_has_conductivity, METH_VARARGS, NULL},
	 { "material_function_conductivity", _wrap_material_function_conductivity, METH_VARARGS, NULL},
	 { "material_function_normal_vector", _wrap_material_function_normal_vector, METH_VARARGS, NULL},
	 { "material_function_eff_chi1inv_row", _wrap_material_function_eff_chi1inv_row, METH_VARARGS, NULL},
	 { "material_function_sigma_row", _wrap_material_function_sigma_row, METH_VARARGS, NULL},
	 { "material_function_has_chi3", _wrap_material_function_has_chi3, METH_VARARGS, NULL},
	 { "material_function_chi3", _wrap_material_function_chi3, METH_VARARGS, NULL},
	 { "material_function_has_chi2", _wrap_material_function_has_chi2, METH_VARARGS, NULL},
	 { "material_function_chi2", _wrap_material_function_chi2, METH_VARARGS, NULL},
	 { "material_function_swigregister", material_function_swigregister, METH_O, NULL},
	 { "material_function_swiginit", material_function_swiginit, METH_VARARGS, NULL},
	 { "new_simple_material_function", _wrap_new_simple_material_function, METH_VARARGS, NULL},
	 { "delete_simple_material_function", _wrap_delete_simple_material_function, METH_VARARGS, NULL},
	 { "simple_material_function_chi1p1", _wrap_simple_material_function_chi1p1, METH_VARARGS, NULL},
	 { "simple_material_function_eps", _wrap_simple_material_function_eps, METH_VARARGS, NULL},
	 { "simple_material_function_mu", _wrap_simple_material_function_mu, METH_VARARGS, NULL},
	 { "simple_material_function_conductivity", _wrap_simple_material_function_conductivity, METH_VARARGS, NULL},
	 { "simple_material_function_sigma_row", _wrap_simple_material_function_sigma_row, METH_VARARGS, NULL},
	 { "simple_material_function_chi3", _wrap_simple_material_function_chi3, METH_VARARGS, NULL},
	 { "simple_material_function_chi2", _wrap_simple_material_function_chi2, METH_VARARGS, NULL},
	 { "simple_material_function_swigregister", simple_material_function_swigregister, METH_O, NULL},
	 { "simple_material_function_swiginit", simple_material_function_swiginit, METH_VARARGS, NULL},
	 { "structure_chunk_a_set", _wrap_structure_chunk_a_set, METH_VARARGS, NULL},
	 { "structure_chunk_a_get", _wrap_structure_chunk_a_get, METH_VARARGS, NULL},
	 { "structure_chunk_Courant_set", _wrap_structure_chunk_Courant_set, METH_VARARGS, NULL},
	 { "structure_chunk_Courant_get", _wrap_structure_chunk_Courant_get, METH_VARARGS, NULL},
	 { "structure_chunk_dt_set", _wrap_structure_chunk_dt_set, METH_VARARGS, NULL},
	 { "structure_chunk_dt_get", _wrap_structure_chunk_dt_get, METH_VARARGS, NULL},
	 { "structure_chunk_chi3_set", _wrap_structure_chunk_chi3_set, METH_VARARGS, NULL},
	 { "structure_chunk_chi3_get", _wrap_structure_chunk_chi3_get, METH_VARARGS, NULL},
	 { "structure_chunk_chi2_set", _wrap_structure_chunk_chi2_set, METH_VARARGS, NULL},
	 { "structure_chunk_chi2_get", _wrap_structure_chunk_chi2_get, METH_VARARGS, NULL},
	 { "structure_chunk_chi1inv_set", _wrap_structure_chunk_chi1inv_set, METH_VARARGS, NULL},
	 { "structure_chunk_chi1inv_get", _wrap_structure_chunk_chi1inv_get, METH_VARARGS, NULL},
	 { "structure_chunk_trivial_chi1inv_set", _wrap_structure_chunk_trivial_chi1inv_set, METH_VARARGS, NULL},
	 { "structure_chunk_trivial_chi1inv_get", _wrap_structure_chunk_trivial_chi1inv_get, METH_VARARGS, NULL},
	 { "structure_chunk_conductivity_set", _wrap_structure_chunk_conductivity_set, METH_VARARGS, NULL},
	 { "structure_chunk_conductivity_get", _wrap_structure_chunk_conductivity_get, METH_VARARGS, NULL},
	 { "structure_chunk_condinv_set", _wrap_structure_chunk_condinv_set, METH_VARARGS, NULL},
	 { "structure_chunk_condinv_get", _wrap_structure_chunk_condinv_get, METH_VARARGS, NULL},
	 { "structure_chunk_condinv_stale_set", _wrap_structure_chunk_condinv_stale_set, METH_VARARGS, NULL},
	 { "structure_chunk_condinv_stale_get", _wrap_structure_chunk_condinv_stale_get, METH_VARARGS, NULL},
	 { "structure_chunk_sig_set", _wrap_structure_chunk_sig_set, METH_VARARGS, NULL},
	 { "structure_chunk_sig_get", _wrap_structure_chunk_sig_get, METH_VARARGS, NULL},
	 { "structure_chunk_kap_set", _wrap_structure_chunk_kap_set, METH_VARARGS, NULL},
	 { "structure_chunk_kap_get", _wrap_structure_chunk_kap_get, METH_VARARGS, NULL},
	 { "structure_chunk_siginv_set", _wrap_structure_chunk_siginv_set, METH_VARARGS, NULL},
	 { "structure_chunk_siginv_get", _wrap_structure_chunk_siginv_get, METH_VARARGS, NULL},
	 { "structure_chunk_sigsize_set", _wrap_structure_chunk_sigsize_set, METH_VARARGS, NULL},
	 { "structure_chunk_sigsize_get", _wrap_structure_chunk_sigsize_get, METH_VARARGS, NULL},
	 { "structure_chunk_gv_set", _wrap_structure_chunk_gv_set, METH_VARARGS, NULL},
	 { "structure_chunk_gv_get", _wrap_structure_chunk_gv_get, METH_VARARGS, NULL},
	 { "structure_chunk_v_set", _wrap_structure_chunk_v_set, METH_VARARGS, NULL},
	 { "structure_chunk_v_get", _wrap_structure_chunk_v_get, METH_VARARGS, NULL},
	 { "structure_chunk_chiP_set", _wrap_structure_chunk_chiP_set, METH_VARARGS, NULL},
	 { "structure_chunk_chiP_get", _wrap_structure_chunk_chiP_get, METH_VARARGS, NULL},
	 { "structure_chunk_cost_set", _wrap_structure_chunk_cost_set, METH_VARARGS, NULL},
	 { "structure_chunk_cost_get", _wrap_structure_chunk_cost_get, METH_VARARGS, NULL},
	 { "structure_chunk_refcount_set", _wrap_structure_chunk_refcount_set, METH_VARARGS, NULL},
	 { "structure_chunk_refcount_get", _wrap_structure_chunk_refcount_get, METH_VARARGS, NULL},
	 { "delete_structure_chunk", _wrap_delete_structure_chunk, METH_VARARGS, NULL},
	 { "new_structure_chunk", _wrap_new_structure_chunk, METH_VARARGS, NULL},
	 { "structure_chunk_set_chi1inv", _wrap_structure_chunk_set_chi1inv, METH_VARARGS, NULL},
	 { "structure_chunk_has_chi", _wrap_structure_chunk_has_chi, METH_VARARGS, NULL},
	 { "structure_chunk_has_chisigma", _wrap_structure_chunk_has_chisigma, METH_VARARGS, NULL},
	 { "structure_chunk_has_chi1inv", _wrap_structure_chunk_has_chi1inv, METH_VARARGS, NULL},
	 { "structure_chunk_set_conductivity", _wrap_structure_chunk_set_conductivity, METH_VARARGS, NULL},
	 { "structure_chunk_update_condinv", _wrap_structure_chunk_update_condinv, METH_VARARGS, NULL},
	 { "structure_chunk_set_chi3", _wrap_structure_chunk_set_chi3, METH_VARARGS, NULL},
	 { "structure_chunk_set_chi2", _wrap_structure_chunk_set_chi2, METH_VARARGS, NULL},
	 { "structure_chunk_use_pml", _wrap_structure_chunk_use_pml, METH_VARARGS, NULL},
	 { "structure_chunk_add_susceptibility", _wrap_structure_chunk_add_susceptibility, METH_VARARGS, NULL},
	 { "structure_chunk_mix_with", _wrap_structure_chunk_mix_with, METH_VARARGS, NULL},
	 { "structure_chunk_n_proc", _wrap_structure_chunk_n_proc, METH_VARARGS, NULL},
	 { "structure_chunk_is_mine", _wrap_structure_chunk_is_mine, METH_VARARGS, NULL},
	 { "structure_chunk_remove_susceptibilities", _wrap_structure_chunk_remove_susceptibilities, METH_VARARGS, NULL},
	 { "structure_chunk_get_chi1inv_at_pt", _wrap_structure_chunk_get_chi1inv_at_pt, METH_VARARGS, NULL},
	 { "structure_chunk_get_chi1inv", _wrap_structure_chunk_get_chi1inv, METH_VARARGS, NULL},
	 { "structure_chunk_get_inveps", _wrap_structure_chunk_get_inveps, METH_VARARGS, NULL},
	 { "structure_chunk_max_eps", _wrap_structure_chunk_max_eps, METH_VARARGS, NULL},
	 { "structure_chunk_swigregister", structure_chunk_swigregister, METH_O, NULL},
	 { "structure_chunk_swiginit", structure_chunk_swiginit, METH_VARARGS, NULL},
	 { "new_boundary_region", _wrap_new_boundary_region, METH_VARARGS, NULL},
	 { "delete_boundary_region", _wrap_delete_boundary_region, METH_VARARGS, NULL},
	 { "boundary_region_boundary_region_assign", _wrap_boundary_region_boundary_region_assign, METH_VARARGS, NULL},
	 { "boundary_region___add__", _wrap_boundary_region___add__, METH_VARARGS, NULL},
	 { "boundary_region___mul__", _wrap_boundary_region___mul__, METH_VARARGS, NULL},
	 { "boundary_region_br_apply", _wrap_boundary_region_br_apply, METH_VARARGS, NULL},
	 { "boundary_region_check_ok", _wrap_boundary_region_check_ok, METH_VARARGS, NULL},
	 { "boundary_region_swigregister", boundary_region_swigregister, METH_O, NULL},
	 { "boundary_region_swiginit", boundary_region_swiginit, METH_VARARGS, NULL},
	 { "pml", _wrap_pml, METH_VARARGS, NULL},
	 { "__eq__", _wrap___eq__, METH_VARARGS, NULL},
	 { "structure_chunks_set", _wrap_structure_chunks_set, METH_VARARGS, NULL},
	 { "structure_chunks_get", _wrap_structure_chunks_get, METH_VARARGS, NULL},
	 { "structure_num_chunks_set", _wrap_structure_num_chunks_set, METH_VARARGS, NULL},
	 { "structure_num_chunks_get", _wrap_structure_num_chunks_get, METH_VARARGS, NULL},
	 { "structure_shared_chunks_set", _wrap_structure_shared_chunks_set, METH_VARARGS, NULL},
	 { "structure_shared_chunks_get", _wrap_structure_shared_chunks_get, METH_VARARGS, NULL},
	 { "structure_gv_set", _wrap_structure_gv_set, METH_VARARGS, NULL},
	 { "structure_gv_get", _wrap_structure_gv_get, METH_VARARGS, NULL},
	 { "structure_user_volume_set", _wrap_structure_user_volume_set, METH_VARARGS, NULL},
	 { "structure_user_volume_get", _wrap_structure_user_volume_get, METH_VARARGS, NULL},
	 { "structure_a_set", _wrap_structure_a_set, METH_VARARGS, NULL},
	 { "structure_a_get", _wrap_structure_a_get, METH_VARARGS, NULL},
	 { "structure_Courant_set", _wrap_structure_Courant_set, METH_VARARGS, NULL},
	 { "structure_Courant_get", _wrap_structure_Courant_get, METH_VARARGS, NULL},
	 { "structure_dt_set", _wrap_structure_dt_set, METH_VARARGS, NULL},
	 { "structure_dt_get", _wrap_structure_dt_get, METH_VARARGS, NULL},
	 { "structure_v_set", _wrap_structure_v_set, METH_VARARGS, NULL},
	 { "structure_v_get", _wrap_structure_v_get, METH_VARARGS, NULL},
	 { "structure_S_set", _wrap_structure_S_set, METH_VARARGS, NULL},
	 { "structure_S_get", _wrap_structure_S_get, METH_VARARGS, NULL},
	 { "structure_outdir_set", _wrap_structure_outdir_set, METH_VARARGS, NULL},
	 { "structure_outdir_get", _wrap_structure_outdir_get, METH_VARARGS, NULL},
	 { "structure_effort_volumes_set", _wrap_structure_effort_volumes_set, METH_VARARGS, NULL},
	 { "structure_effort_volumes_get", _wrap_structure_effort_volumes_get, METH_VARARGS, NULL},
	 { "structure_effort_set", _wrap_structure_effort_set, METH_VARARGS, NULL},
	 { "structure_effort_get", _wrap_structure_effort_get, METH_VARARGS, NULL},
	 { "structure_num_effort_volumes_set", _wrap_structure_num_effort_volumes_set, METH_VARARGS, NULL},
	 { "structure_num_effort_volumes_get", _wrap_structure_num_effort_volumes_get, METH_VARARGS, NULL},
	 { "delete_structure", _wrap_delete_structure, METH_VARARGS, NULL},
	 { "new_structure", _wrap_new_structure, METH_VARARGS, NULL},
	 { "structure_set_materials", _wrap_structure_set_materials, METH_VARARGS, NULL},
	 { "structure_set_chi1inv", _wrap_structure_set_chi1inv, METH_VARARGS, NULL},
	 { "structure_has_chi", _wrap_structure_has_chi, METH_VARARGS, NULL},
	 { "structure_set_epsilon", _wrap_structure_set_epsilon, METH_VARARGS, NULL},
	 { "structure_set_mu", _wrap_structure_set_mu, METH_VARARGS, NULL},
	 { "structure_set_conductivity", _wrap_structure_set_conductivity, METH_VARARGS, NULL},
	 { "structure_set_chi3", _wrap_structure_set_chi3, METH_VARARGS, NULL},
	 { "structure_set_chi2", _wrap_structure_set_chi2, METH_VARARGS, NULL},
	 { "structure_add_susceptibility", _wrap_structure_add_susceptibility, METH_VARARGS, NULL},
	 { "structure_remove_susceptibilities", _wrap_structure_remove_susceptibilities, METH_VARARGS, NULL},
	 { "structure_set_output_directory", _wrap_structure_set_output_directory, METH_VARARGS, NULL},
	 { "structure_mix_with", _wrap_structure_mix_with, METH_VARARGS, NULL},
	 { "structure_equal_layout", _wrap_structure_equal_layout, METH_VARARGS, NULL},
	 { "structure_print_layout", _wrap_structure_print_layout, METH_VARARGS, NULL},
	 { "structure_get_chunk_volumes", _wrap_structure_get_chunk_volumes, METH_VARARGS, NULL},
	 { "structure_get_chunk_owners", _wrap_structure_get_chunk_owners, METH_VARARGS, NULL},
	 { "structure_dump", _wrap_structure_dump, METH_VARARGS, NULL},
	 { "structure_load", _wrap_structure_load, METH_VARARGS, NULL},
	 { "structure_dump_chunk_layout", _wrap_structure_dump_chunk_layout, METH_VARARGS, NULL},
	 { "structure_load_chunk_layout", _wrap_structure_load_chunk_layout, METH_VARARGS, NULL},
	 { "structure_get_chi1inv", _wrap_structure_get_chi1inv, METH_VARARGS, NULL},
	 { "structure_get_inveps", _wrap_structure_get_inveps, METH_VARARGS, NULL},
	 { "structure_get_eps", _wrap_structure_get_eps, METH_VARARGS, NULL},
	 { "structure_get_mu", _wrap_structure_get_mu, METH_VARARGS, NULL},
	 { "structure_max_eps", _wrap_structure_max_eps, METH_VARARGS, NULL},
	 { "structure_estimated_cost", _wrap_structure_estimated_cost, METH_VARARGS, NULL},
	 { "structure_get_binary_partition", _wrap_structure_get_binary_partition, METH_VARARGS, NULL},
	 { "structure_swigregister", structure_swigregister, METH_O, NULL},
	 { "structure_swiginit", structure_swiginit, METH_VARARGS, NULL},
	 { "split_by_binarytree", _wrap_split_by_binarytree, METH_VARARGS, NULL},
	 { "src_time_is_integrated_set", _wrap_src_time_is_integrated_set, METH_VARARGS, NULL},
	 { "src_time_is_integrated_get", _wrap_src_time_is_integrated_get, METH_VARARGS, NULL},
	 { "src_time_id_set", _wrap_src_time_id_set, METH_VARARGS, NULL},
	 { "src_time_id_get", _wrap_src_time_id_get, METH_VARARGS, NULL},
	 { "delete_src_time", _wrap_delete_src_time, METH_VARARGS, NULL},
	 { "new_src_time", _wrap_new_src_time, METH_VARARGS, NULL},
	 { "src_time_update", _wrap_src_time_update, METH_VARARGS, NULL},
	 { "src_time_current", _wrap_src_time_current, METH_VARARGS, NULL},
	 { "src_time_last_time_max", _wrap_src_time_last_time_max, METH_VARARGS, NULL},
	 { "src_time_add_to", _wrap_src_time_add_to, METH_VARARGS, NULL},
	 { "src_time_next_set", _wrap_src_time_next_set, METH_VARARGS, NULL},
	 { "src_time_next_get", _wrap_src_time_next_get, METH_VARARGS, NULL},
	 { "src_time_dipole", _wrap_src_time_dipole, METH_VARARGS, NULL},
	 { "src_time_last_time", _wrap_src_time_last_time, METH_VARARGS, NULL},
	 { "src_time_clone", _wrap_src_time_clone, METH_VARARGS, NULL},
	 { "src_time_is_equal", _wrap_src_time_is_equal, METH_VARARGS, NULL},
	 { "src_time_frequency", _wrap_src_time_frequency, METH_VARARGS, NULL},
	 { "src_time_get_fwidth", _wrap_src_time_get_fwidth, METH_VARARGS, NULL},
	 { "src_time_set_fwidth", _wrap_src_time_set_fwidth, METH_VARARGS, NULL},
	 { "src_time_set_frequency", _wrap_src_time_set_frequency, METH_VARARGS, NULL},
	 { "src_time_swigregister", src_time_swigregister, METH_O, NULL},
	 { "src_time_swiginit", src_time_swiginit, METH_VARARGS, NULL},
	 { "src_times_equal", _wrap_src_times_equal, METH_VARARGS, NULL},
	 { "new_gaussian_src_time", _wrap_new_gaussian_src_time, METH_VARARGS, NULL},
	 { "delete_gaussian_src_time", _wrap_delete_gaussian_src_time, METH_VARARGS, NULL},
	 { "gaussian_src_time_dipole", _wrap_gaussian_src_time_dipole, METH_VARARGS, NULL},
	 { "gaussian_src_time_last_time", _wrap_gaussian_src_time_last_time, METH_VARARGS, NULL},
	 { "gaussian_src_time_clone", _wrap_gaussian_src_time_clone, METH_VARARGS, NULL},
	 { "gaussian_src_time_is_equal", _wrap_gaussian_src_time_is_equal, METH_VARARGS, NULL},
	 { "gaussian_src_time_frequency", _wrap_gaussian_src_time_frequency, METH_VARARGS, NULL},
	 { "gaussian_src_time_get_fwidth", _wrap_gaussian_src_time_get_fwidth, METH_VARARGS, NULL},
	 { "gaussian_src_time_set_fwidth", _wrap_gaussian_src_time_set_fwidth, METH_VARARGS, NULL},
	 { "gaussian_src_time_set_frequency", _wrap_gaussian_src_time_set_frequency, METH_VARARGS, NULL},
	 { "gaussian_src_time_fourier_transform", _wrap_gaussian_src_time_fourier_transform, METH_VARARGS, NULL},
	 { "gaussian_src_time_swigregister", gaussian_src_time_swigregister, METH_O, NULL},
	 { "gaussian_src_time_swiginit", gaussian_src_time_swiginit, METH_VARARGS, NULL},
	 { "new_continuous_src_time", _wrap_new_continuous_src_time, METH_VARARGS, NULL},
	 { "delete_continuous_src_time", _wrap_delete_continuous_src_time, METH_VARARGS, NULL},
	 { "continuous_src_time_dipole", _wrap_continuous_src_time_dipole, METH_VARARGS, NULL},
	 { "continuous_src_time_last_time", _wrap_continuous_src_time_last_time, METH_VARARGS, NULL},
	 { "continuous_src_time_clone", _wrap_continuous_src_time_clone, METH_VARARGS, NULL},
	 { "continuous_src_time_is_equal", _wrap_continuous_src_time_is_equal, METH_VARARGS, NULL},
	 { "continuous_src_time_frequency", _wrap_continuous_src_time_frequency, METH_VARARGS, NULL},
	 { "continuous_src_time_get_fwidth", _wrap_continuous_src_time_get_fwidth, METH_VARARGS, NULL},
	 { "continuous_src_time_set_frequency", _wrap_continuous_src_time_set_frequency, METH_VARARGS, NULL},
	 { "continuous_src_time_swigregister", continuous_src_time_swigregister, METH_O, NULL},
	 { "continuous_src_time_swiginit", continuous_src_time_swiginit, METH_VARARGS, NULL},
	 { "new_custom_src_time", _wrap_new_custom_src_time, METH_VARARGS, NULL},
	 { "delete_custom_src_time", _wrap_delete_custom_src_time, METH_VARARGS, NULL},
	 { "custom_src_time_current", _wrap_custom_src_time_current, METH_VARARGS, NULL},
	 { "custom_src_time_dipole", _wrap_custom_src_time_dipole, METH_VARARGS, NULL},
	 { "custom_src_time_last_time", _wrap_custom_src_time_last_time, METH_VARARGS, NULL},
	 { "custom_src_time_clone", _wrap_custom_src_time_clone, METH_VARARGS, NULL},
	 { "custom_src_time_is_equal", _wrap_custom_src_time_is_equal, METH_VARARGS, NULL},
	 { "custom_src_time_frequency", _wrap_custom_src_time_frequency, METH_VARARGS, NULL},
	 { "custom_src_time_set_frequency", _wrap_custom_src_time_set_frequency, METH_VARARGS, NULL},
	 { "custom_src_time_get_fwidth", _wrap_custom_src_time_get_fwidth, METH_VARARGS, NULL},
	 { "custom_src_time_set_fwidth", _wrap_custom_src_time_set_fwidth, METH_VARARGS, NULL},
	 { "custom_src_time_swigregister", custom_src_time_swigregister, METH_O, NULL},
	 { "custom_src_time_swiginit", custom_src_time_swiginit, METH_VARARGS, NULL},
	 { "new_monitor_point", _wrap_new_monitor_point, METH_VARARGS, NULL},
	 { "delete_monitor_point", _wrap_delete_monitor_point, METH_VARARGS, NULL},
	 { "monitor_point_loc_set", _wrap_monitor_point_loc_set, METH_VARARGS, NULL},
	 { "monitor_point_loc_get", _wrap_monitor_point_loc_get, METH_VARARGS, NULL},
	 { "monitor_point_t_set", _wrap_monitor_point_t_set, METH_VARARGS, NULL},
	 { "monitor_point_t_get", _wrap_monitor_point_t_get, METH_VARARGS, NULL},
	 { "monitor_point_f_set", _wrap_monitor_point_f_set, METH_VARARGS, NULL},
	 { "monitor_point_f_get", _wrap_monitor_point_f_get, METH_VARARGS, NULL},
	 { "monitor_point_next_set", _wrap_monitor_point_next_set, METH_VARARGS, NULL},
	 { "monitor_point_next_get", _wrap_monitor_point_next_get, METH_VARARGS, NULL},
	 { "monitor_point_get_component", _wrap_monitor_point_get_component, METH_VARARGS, NULL},
	 { "monitor_point_poynting_in_direction", _wrap_monitor_point_poynting_in_direction, METH_VARARGS, NULL},
	 { "monitor_point_fourier_transform", _wrap_monitor_point_fourier_transform, METH_VARARGS, NULL},
	 { "monitor_point_harminv", _wrap_monitor_point_harminv, METH_VARARGS, NULL},
	 { "monitor_point_swigregister", monitor_point_swigregister, METH_O, NULL},
	 { "monitor_point_swiginit", monitor_point_swiginit, METH_VARARGS, NULL},
	 { "new_dft_chunk", _wrap_new_dft_chunk, METH_VARARGS, NULL},
	 { "delete_dft_chunk", _wrap_delete_dft_chunk, METH_VARARGS, NULL},
	 { "dft_chunk_update_dft", _wrap_dft_chunk_update_dft, METH_VARARGS, NULL},
	 { "dft_chunk_norm2", _wrap_dft_chunk_norm2, METH_VARARGS, NULL},
	 { "dft_chunk_maxomega", _wrap_dft_chunk_maxomega, METH_VARARGS, NULL},
	 { "dft_chunk_scale_dft", _wrap_dft_chunk_scale_dft, METH_VARARGS, NULL},
	 { "dft_chunk_process_dft_component", _wrap_dft_chunk_process_dft_component, METH_VARARGS, NULL},
	 { "dft_chunk_get_decimation_factor", _wrap_dft_chunk_get_decimation_factor, METH_VARARGS, NULL},
	 { "dft_chunk___isub__", _wrap_dft_chunk___isub__, METH_VARARGS, NULL},
	 { "dft_chunk_omega_set", _wrap_dft_chunk_omega_set, METH_VARARGS, NULL},
	 { "dft_chunk_omega_get", _wrap_dft_chunk_omega_get, METH_VARARGS, NULL},
	 { "dft_chunk_persist_set", _wrap_dft_chunk_persist_set, METH_VARARGS, NULL},
	 { "dft_chunk_persist_get", _wrap_dft_chunk_persist_get, METH_VARARGS, NULL},
	 { "dft_chunk_c_set", _wrap_dft_chunk_c_set, METH_VARARGS, NULL},
	 { "dft_chunk_c_get", _wrap_dft_chunk_c_get, METH_VARARGS, NULL},
	 { "dft_chunk_N_set", _wrap_dft_chunk_N_set, METH_VARARGS, NULL},
	 { "dft_chunk_N_get", _wrap_dft_chunk_N_get, METH_VARARGS, NULL},
	 { "dft_chunk_dft_set", _wrap_dft_chunk_dft_set, METH_VARARGS, NULL},
	 { "dft_chunk_dft_get", _wrap_dft_chunk_dft_get, METH_VARARGS, NULL},
	 { "dft_chunk_next_in_chunk_set", _wrap_dft_chunk_next_in_chunk_set, METH_VARARGS, NULL},
	 { "dft_chunk_next_in_chunk_get", _wrap_dft_chunk_next_in_chunk_get, METH_VARARGS, NULL},
	 { "dft_chunk_next_in_dft_set", _wrap_dft_chunk_next_in_dft_set, METH_VARARGS, NULL},
	 { "dft_chunk_next_in_dft_get", _wrap_dft_chunk_next_in_dft_get, METH_VARARGS, NULL},
	 { "dft_chunk_stored_weight_set", _wrap_dft_chunk_stored_weight_set, METH_VARARGS, NULL},
	 { "dft_chunk_stored_weight_get", _wrap_dft_chunk_stored_weight_get, METH_VARARGS, NULL},
	 { "dft_chunk_include_dV_and_interp_weights_set", _wrap_dft_chunk_include_dV_and_interp_weights_set, METH_VARARGS, NULL},
	 { "dft_chunk_include_dV_and_interp_weights_get", _wrap_dft_chunk_include_dV_and_interp_weights_get, METH_VARARGS, NULL},
	 { "dft_chunk_sqrt_dV_and_interp_weights_set", _wrap_dft_chunk_sqrt_dV_and_interp_weights_set, METH_VARARGS, NULL},
	 { "dft_chunk_sqrt_dV_and_interp_weights_get", _wrap_dft_chunk_sqrt_dV_and_interp_weights_get, METH_VARARGS, NULL},
	 { "dft_chunk_extra_weight_set", _wrap_dft_chunk_extra_weight_set, METH_VARARGS, NULL},
	 { "dft_chunk_extra_weight_get", _wrap_dft_chunk_extra_weight_get, METH_VARARGS, NULL},
	 { "dft_chunk_fc_set", _wrap_dft_chunk_fc_set, METH_VARARGS, NULL},
	 { "dft_chunk_fc_get", _wrap_dft_chunk_fc_get, METH_VARARGS, NULL},
	 { "dft_chunk__is_set", _wrap_dft_chunk__is_set, METH_VARARGS, NULL},
	 { "dft_chunk__is_get", _wrap_dft_chunk__is_get, METH_VARARGS, NULL},
	 { "dft_chunk_ie_set", _wrap_dft_chunk_ie_set, METH_VARARGS, NULL},
	 { "dft_chunk_ie_get", _wrap_dft_chunk_ie_get, METH_VARARGS, NULL},
	 { "dft_chunk_is_old_set", _wrap_dft_chunk_is_old_set, METH_VARARGS, NULL},
	 { "dft_chunk_is_old_get", _wrap_dft_chunk_is_old_get, METH_VARARGS, NULL},
	 { "dft_chunk_ie_old_set", _wrap_dft_chunk_ie_old_set, METH_VARARGS, NULL},
	 { "dft_chunk_ie_old_get", _wrap_dft_chunk_ie_old_get, METH_VARARGS, NULL},
	 { "dft_chunk_s0_set", _wrap_dft_chunk_s0_set, METH_VARARGS, NULL},
	 { "dft_chunk_s0_get", _wrap_dft_chunk_s0_get, METH_VARARGS, NULL},
	 { "dft_chunk_s1_set", _wrap_dft_chunk_s1_set, METH_VARARGS, NULL},
	 { "dft_chunk_s1_get", _wrap_dft_chunk_s1_get, METH_VARARGS, NULL},
	 { "dft_chunk_e0_set", _wrap_dft_chunk_e0_set, METH_VARARGS, NULL},
	 { "dft_chunk_e0_get", _wrap_dft_chunk_e0_get, METH_VARARGS, NULL},
	 { "dft_chunk_e1_set", _wrap_dft_chunk_e1_set, METH_VARARGS, NULL},
	 { "dft_chunk_e1_get", _wrap_dft_chunk_e1_get, METH_VARARGS, NULL},
	 { "dft_chunk_dV0_set", _wrap_dft_chunk_dV0_set, METH_VARARGS, NULL},
	 { "dft_chunk_dV0_get", _wrap_dft_chunk_dV0_get, METH_VARARGS, NULL},
	 { "dft_chunk_dV1_set", _wrap_dft_chunk_dV1_set, METH_VARARGS, NULL},
	 { "dft_chunk_dV1_get", _wrap_dft_chunk_dV1_get, METH_VARARGS, NULL},
	 { "dft_chunk_empty_dim_set", _wrap_dft_chunk_empty_dim_set, METH_VARARGS, NULL},
	 { "dft_chunk_empty_dim_get", _wrap_dft_chunk_empty_dim_get, METH_VARARGS, NULL},
	 { "dft_chunk_scale_set", _wrap_dft_chunk_scale_set, METH_VARARGS, NULL},
	 { "dft_chunk_scale_get", _wrap_dft_chunk_scale_get, METH_VARARGS, NULL},
	 { "dft_chunk_shift_set", _wrap_dft_chunk_shift_set, METH_VARARGS, NULL},
	 { "dft_chunk_shift_get", _wrap_dft_chunk_shift_get, METH_VARARGS, NULL},
	 { "dft_chunk_S_set", _wrap_dft_chunk_S_set, METH_VARARGS, NULL},
	 { "dft_chunk_S_get", _wrap_dft_chunk_S_get, METH_VARARGS, NULL},
	 { "dft_chunk_sn_set", _wrap_dft_chunk_sn_set, METH_VARARGS, NULL},
	 { "dft_chunk_sn_get", _wrap_dft_chunk_sn_get, METH_VARARGS, NULL},
	 { "dft_chunk_dft_phase_set", _wrap_dft_chunk_dft_phase_set, METH_VARARGS, NULL},
	 { "dft_chunk_dft_phase_get", _wrap_dft_chunk_dft_phase_get, METH_VARARGS, NULL},
	 { "dft_chunk_avg1_set", _wrap_dft_chunk_avg1_set, METH_VARARGS, NULL},
	 { "dft_chunk_avg1_get", _wrap_dft_chunk_avg1_get, METH_VARARGS, NULL},
	 { "dft_chunk_avg2_set", _wrap_dft_chunk_avg2_set, METH_VARARGS, NULL},
	 { "dft_chunk_avg2_get", _wrap_dft_chunk_avg2_get, METH_VARARGS, NULL},
	 { "dft_chunk_vc_set", _wrap_dft_chunk_vc_set, METH_VARARGS, NULL},
	 { "dft_chunk_vc_get", _wrap_dft_chunk_vc_get, METH_VARARGS, NULL},
	 { "dft_chunk_swigregister", dft_chunk_swigregister, METH_O, NULL},
	 { "dft_chunk_swiginit", dft_chunk_swiginit, METH_VARARGS, NULL},
	 { "save_dft_hdf5", _wrap_save_dft_hdf5, METH_VARARGS, NULL},
	 { "load_dft_hdf5", _wrap_load_dft_hdf5, METH_VARARGS, NULL},
	 { "new_dft_flux", _wrap_new_dft_flux, METH_VARARGS, NULL},
	 { "dft_flux_flux", _wrap_dft_flux_flux, METH_VARARGS, NULL},
	 { "dft_flux___isub__", _wrap_dft_flux___isub__, METH_VARARGS, NULL},
	 { "dft_flux_save_hdf5", _wrap_dft_flux_save_hdf5, METH_VARARGS, NULL},
	 { "dft_flux_load_hdf5", _wrap_dft_flux_load_hdf5, METH_VARARGS, NULL},
	 { "dft_flux_scale_dfts", _wrap_dft_flux_scale_dfts, METH_VARARGS, NULL},
	 { "dft_flux_remove", _wrap_dft_flux_remove, METH_VARARGS, NULL},
	 { "dft_flux_freq_set", _wrap_dft_flux_freq_set, METH_VARARGS, NULL},
	 { "dft_flux_freq_get", _wrap_dft_flux_freq_get, METH_VARARGS, NULL},
	 { "dft_flux_E_set", _wrap_dft_flux_E_set, METH_VARARGS, NULL},
	 { "dft_flux_E_get", _wrap_dft_flux_E_get, METH_VARARGS, NULL},
	 { "dft_flux_H_set", _wrap_dft_flux_H_set, METH_VARARGS, NULL},
	 { "dft_flux_H_get", _wrap_dft_flux_H_get, METH_VARARGS, NULL},
	 { "dft_flux_cE_set", _wrap_dft_flux_cE_set, METH_VARARGS, NULL},
	 { "dft_flux_cE_get", _wrap_dft_flux_cE_get, METH_VARARGS, NULL},
	 { "dft_flux_cH_set", _wrap_dft_flux_cH_set, METH_VARARGS, NULL},
	 { "dft_flux_cH_get", _wrap_dft_flux_cH_get, METH_VARARGS, NULL},
	 { "dft_flux_where_set", _wrap_dft_flux_where_set, METH_VARARGS, NULL},
	 { "dft_flux_where_get", _wrap_dft_flux_where_get, METH_VARARGS, NULL},
	 { "dft_flux_normal_direction_set", _wrap_dft_flux_normal_direction_set, METH_VARARGS, NULL},
	 { "dft_flux_normal_direction_get", _wrap_dft_flux_normal_direction_get, METH_VARARGS, NULL},
	 { "dft_flux_use_symmetry_set", _wrap_dft_flux_use_symmetry_set, METH_VARARGS, NULL},
	 { "dft_flux_use_symmetry_get", _wrap_dft_flux_use_symmetry_get, METH_VARARGS, NULL},
	 { "delete_dft_flux", _wrap_delete_dft_flux, METH_VARARGS, NULL},
	 { "dft_flux_swigregister", dft_flux_swigregister, METH_O, NULL},
	 { "dft_flux_swiginit", dft_flux_swiginit, METH_VARARGS, NULL},
	 { "new_dft_energy", _wrap_new_dft_energy, METH_VARARGS, NULL},
	 { "dft_energy_electric", _wrap_dft_energy_electric, METH_VARARGS, NULL},
	 { "dft_energy_magnetic", _wrap_dft_energy_magnetic, METH_VARARGS, NULL},
	 { "dft_energy_total", _wrap_dft_energy_total, METH_VARARGS, NULL},
	 { "dft_energy___isub__", _wrap_dft_energy___isub__, METH_VARARGS, NULL},
	 { "dft_energy_save_hdf5", _wrap_dft_energy_save_hdf5, METH_VARARGS, NULL},
	 { "dft_energy_load_hdf5", _wrap_dft_energy_load_hdf5, METH_VARARGS, NULL},
	 { "dft_energy_scale_dfts", _wrap_dft_energy_scale_dfts, METH_VARARGS, NULL},
	 { "dft_energy_remove", _wrap_dft_energy_remove, METH_VARARGS, NULL},
	 { "dft_energy_freq_set", _wrap_dft_energy_freq_set, METH_VARARGS, NULL},
	 { "dft_energy_freq_get", _wrap_dft_energy_freq_get, METH_VARARGS, NULL},
	 { "dft_energy_E_set", _wrap_dft_energy_E_set, METH_VARARGS, NULL},
	 { "dft_energy_E_get", _wrap_dft_energy_E_get, METH_VARARGS, NULL},
	 { "dft_energy_H_set", _wrap_dft_energy_H_set, METH_VARARGS, NULL},
	 { "dft_energy_H_get", _wrap_dft_energy_H_get, METH_VARARGS, NULL},
	 { "dft_energy_D_set", _wrap_dft_energy_D_set, METH_VARARGS, NULL},
	 { "dft_energy_D_get", _wrap_dft_energy_D_get, METH_VARARGS, NULL},
	 { "dft_energy_B_set", _wrap_dft_energy_B_set, METH_VARARGS, NULL},
	 { "dft_energy_B_get", _wrap_dft_energy_B_get, METH_VARARGS, NULL},
	 { "dft_energy_where_set", _wrap_dft_energy_where_set, METH_VARARGS, NULL},
	 { "dft_energy_where_get", _wrap_dft_energy_where_get, METH_VARARGS, NULL},
	 { "delete_dft_energy", _wrap_delete_dft_energy, METH_VARARGS, NULL},
	 { "dft_energy_swigregister", dft_energy_swigregister, METH_O, NULL},
	 { "dft_energy_swiginit", dft_energy_swiginit, METH_VARARGS, NULL},
	 { "new_dft_force", _wrap_new_dft_force, METH_VARARGS, NULL},
	 { "dft_force_force", _wrap_dft_force_force, METH_VARARGS, NULL},
	 { "dft_force___isub__", _wrap_dft_force___isub__, METH_VARARGS, NULL},
	 { "dft_force_save_hdf5", _wrap_dft_force_save_hdf5, METH_VARARGS, NULL},
	 { "dft_force_load_hdf5", _wrap_dft_force_load_hdf5, METH_VARARGS, NULL},
	 { "dft_force_scale_dfts", _wrap_dft_force_scale_dfts, METH_VARARGS, NULL},
	 { "dft_force_remove", _wrap_dft_force_remove, METH_VARARGS, NULL},
	 { "dft_force_freq_set", _wrap_dft_force_freq_set, METH_VARARGS, NULL},
	 { "dft_force_freq_get", _wrap_dft_force_freq_get, METH_VARARGS, NULL},
	 { "dft_force_offdiag1_set", _wrap_dft_force_offdiag1_set, METH_VARARGS, NULL},
	 { "dft_force_offdiag1_get", _wrap_dft_force_offdiag1_get, METH_VARARGS, NULL},
	 { "dft_force_offdiag2_set", _wrap_dft_force_offdiag2_set, METH_VARARGS, NULL},
	 { "dft_force_offdiag2_get", _wrap_dft_force_offdiag2_get, METH_VARARGS, NULL},
	 { "dft_force_diag_set", _wrap_dft_force_diag_set, METH_VARARGS, NULL},
	 { "dft_force_diag_get", _wrap_dft_force_diag_get, METH_VARARGS, NULL},
	 { "dft_force_where_set", _wrap_dft_force_where_set, METH_VARARGS, NULL},
	 { "dft_force_where_get", _wrap_dft_force_where_get, METH_VARARGS, NULL},
	 { "delete_dft_force", _wrap_delete_dft_force, METH_VARARGS, NULL},
	 { "dft_force_swigregister", dft_force_swigregister, METH_O, NULL},
	 { "dft_force_swiginit", dft_force_swiginit, METH_VARARGS, NULL},
	 { "sourcedata_near_fd_comp_set", _wrap_sourcedata_near_fd_comp_set, METH_VARARGS, NULL},
	 { "sourcedata_near_fd_comp_get", _wrap_sourcedata_near_fd_comp_get, METH_VARARGS, NULL},
	 { "sourcedata_idx_arr_set", _wrap_sourcedata_idx_arr_set, METH_VARARGS, NULL},
	 { "sourcedata_idx_arr_get", _wrap_sourcedata_idx_arr_get, METH_VARARGS, NULL},
	 { "sourcedata_fc_idx_set", _wrap_sourcedata_fc_idx_set, METH_VARARGS, NULL},
	 { "sourcedata_fc_idx_get", _wrap_sourcedata_fc_idx_get, METH_VARARGS, NULL},
	 { "sourcedata_amp_arr_set", _wrap_sourcedata_amp_arr_set, METH_VARARGS, NULL},
	 { "sourcedata_amp_arr_get", _wrap_sourcedata_amp_arr_get, METH_VARARGS, NULL},
	 { "new_sourcedata", _wrap_new_sourcedata, METH_VARARGS, NULL},
	 { "delete_sourcedata", _wrap_delete_sourcedata, METH_VARARGS, NULL},
	 { "sourcedata_swigregister", sourcedata_swigregister, METH_O, NULL},
	 { "sourcedata_swiginit", sourcedata_swiginit, METH_VARARGS, NULL},
	 { "new_dft_near2far", _wrap_new_dft_near2far, METH_VARARGS, NULL},
	 { "dft_near2far_farfield", _wrap_dft_near2far_farfield, METH_VARARGS, NULL},
	 { "dft_near2far_farfield_lowlevel", _wrap_dft_near2far_farfield_lowlevel, METH_VARARGS, NULL},
	 { "dft_near2far_get_farfields_array", _wrap_dft_near2far_get_farfields_array, METH_VARARGS, NULL},
	 { "dft_near2far_save_farfields", _wrap_dft_near2far_save_farfields, METH_VARARGS, NULL},
	 { "dft_near2far_flux", _wrap_dft_near2far_flux, METH_VARARGS, NULL},
	 { "dft_near2far___isub__", _wrap_dft_near2far___isub__, METH_VARARGS, NULL},
	 { "dft_near2far_save_hdf5", _wrap_dft_near2far_save_hdf5, METH_VARARGS, NULL},
	 { "dft_near2far_load_hdf5", _wrap_dft_near2far_load_hdf5, METH_VARARGS, NULL},
	 { "dft_near2far_scale_dfts", _wrap_dft_near2far_scale_dfts, METH_VARARGS, NULL},
	 { "dft_near2far_remove", _wrap_dft_near2far_remove, METH_VARARGS, NULL},
	 { "dft_near2far_freq_set", _wrap_dft_near2far_freq_set, METH_VARARGS, NULL},
	 { "dft_near2far_freq_get", _wrap_dft_near2far_freq_get, METH_VARARGS, NULL},
	 { "dft_near2far_F_set", _wrap_dft_near2far_F_set, METH_VARARGS, NULL},
	 { "dft_near2far_F_get", _wrap_dft_near2far_F_get, METH_VARARGS, NULL},
	 { "dft_near2far_eps_set", _wrap_dft_near2far_eps_set, METH_VARARGS, NULL},
	 { "dft_near2far_eps_get", _wrap_dft_near2far_eps_get, METH_VARARGS, NULL},
	 { "dft_near2far_mu_set", _wrap_dft_near2far_mu_set, METH_VARARGS, NULL},
	 { "dft_near2far_mu_get", _wrap_dft_near2far_mu_get, METH_VARARGS, NULL},
	 { "dft_near2far_where_set", _wrap_dft_near2far_where_set, METH_VARARGS, NULL},
	 { "dft_near2far_where_get", _wrap_dft_near2far_where_get, METH_VARARGS, NULL},
	 { "dft_near2far_periodic_d_set", _wrap_dft_near2far_periodic_d_set, METH_VARARGS, NULL},
	 { "dft_near2far_periodic_d_get", _wrap_dft_near2far_periodic_d_get, METH_VARARGS, NULL},
	 { "dft_near2far_periodic_n_set", _wrap_dft_near2far_periodic_n_set, METH_VARARGS, NULL},
	 { "dft_near2far_periodic_n_get", _wrap_dft_near2far_periodic_n_get, METH_VARARGS, NULL},
	 { "dft_near2far_periodic_k_set", _wrap_dft_near2far_periodic_k_set, METH_VARARGS, NULL},
	 { "dft_near2far_periodic_k_get", _wrap_dft_near2far_periodic_k_get, METH_VARARGS, NULL},
	 { "dft_near2far_period_set", _wrap_dft_near2far_period_set, METH_VARARGS, NULL},
	 { "dft_near2far_period_get", _wrap_dft_near2far_period_get, METH_VARARGS, NULL},
	 { "dft_near2far_near_sourcedata", _wrap_dft_near2far_near_sourcedata, METH_VARARGS, NULL},
	 { "delete_dft_near2far", _wrap_delete_dft_near2far, METH_VARARGS, NULL},
	 { "dft_near2far_swigregister", dft_near2far_swigregister, METH_O, NULL},
	 { "dft_near2far_swiginit", dft_near2far_swiginit, METH_VARARGS, NULL},
	 { "new__dft_ldos", _wrap_new__dft_ldos, METH_VARARGS, NULL},
	 { "delete_dft_ldos", _wrap_delete_dft_ldos, METH_VARARGS, NULL},
	 { "dft_ldos_update", _wrap_dft_ldos_update, METH_VARARGS, NULL},
	 { "dft_ldos_ldos", _wrap_dft_ldos_ldos, METH_VARARGS, NULL},
	 { "dft_ldos_F", _wrap_dft_ldos_F, METH_VARARGS, NULL},
	 { "dft_ldos_J", _wrap_dft_ldos_J, METH_VARARGS, NULL},
	 { "dft_ldos_freq_set", _wrap_dft_ldos_freq_set, METH_VARARGS, NULL},
	 { "dft_ldos_freq_get", _wrap_dft_ldos_freq_get, METH_VARARGS, NULL},
	 { "dft_ldos_overall_scale", _wrap_dft_ldos_overall_scale, METH_VARARGS, NULL},
	 { "dft_ldos_swigregister", dft_ldos_swigregister, METH_O, NULL},
	 { "new_dft_fields", _wrap_new_dft_fields, METH_VARARGS, NULL},
	 { "dft_fields_fourier_sourcedata", _wrap_dft_fields_fourier_sourcedata, METH_VARARGS, NULL},
	 { "dft_fields_scale_dfts", _wrap_dft_fields_scale_dfts, METH_VARARGS, NULL},
	 { "dft_fields_remove", _wrap_dft_fields_remove, METH_VARARGS, NULL},
	 { "dft_fields_freq_set", _wrap_dft_fields_freq_set, METH_VARARGS, NULL},
	 { "dft_fields_freq_get", _wrap_dft_fields_freq_get, METH_VARARGS, NULL},
	 { "dft_fields_chunks_set", _wrap_dft_fields_chunks_set, METH_VARARGS, NULL},
	 { "dft_fields_chunks_get", _wrap_dft_fields_chunks_get, METH_VARARGS, NULL},
	 { "dft_fields_where_set", _wrap_dft_fields_where_set, METH_VARARGS, NULL},
	 { "dft_fields_where_get", _wrap_dft_fields_where_get, METH_VARARGS, NULL},
	 { "delete_dft_fields", _wrap_delete_dft_fields, METH_VARARGS, NULL},
	 { "dft_fields_swigregister", dft_fields_swigregister, METH_O, NULL},
	 { "dft_fields_swiginit", dft_fields_swiginit, METH_VARARGS, NULL},
	 { "polarization_state_data_set", _wrap_polarization_state_data_set, METH_VARARGS, NULL},
	 { "polarization_state_data_get", _wrap_polarization_state_data_get, METH_VARARGS, NULL},
	 { "polarization_state_s_set", _wrap_polarization_state_s_set, METH_VARARGS, NULL},
	 { "polarization_state_s_get", _wrap_polarization_state_s_get, METH_VARARGS, NULL},
	 { "polarization_state_next_set", _wrap_polarization_state_next_set, METH_VARARGS, NULL},
	 { "polarization_state_next_get", _wrap_polarization_state_next_get, METH_VARARGS, NULL},
	 { "new_polarization_state", _wrap_new_polarization_state, METH_VARARGS, NULL},
	 { "delete_polarization_state", _wrap_delete_polarization_state, METH_VARARGS, NULL},
	 { "polarization_state_swigregister", polarization_state_swigregister, METH_O, NULL},
	 { "polarization_state_swiginit", polarization_state_swiginit, METH_VARARGS, NULL},
	 { "derived_component_func", _wrap_derived_component_func, METH_VARARGS, NULL},
	 { "new_chunkloop_field_components", _wrap_new_chunkloop_field_components, METH_VARARGS, NULL},
	 { "chunkloop_field_components_update_values", _wrap_chunkloop_field_components_update_values, METH_VARARGS, NULL},
	 { "chunkloop_field_components_values_set", _wrap_chunkloop_field_components_values_set, METH_VARARGS, NULL},
	 { "chunkloop_field_components_values_get", _wrap_chunkloop_field_components_values_get, METH_VARARGS, NULL},
	 { "delete_chunkloop_field_components", _wrap_delete_chunkloop_field_components, METH_VARARGS, NULL},
	 { "chunkloop_field_components_swigregister", chunkloop_field_components_swigregister, METH_O, NULL},
	 { "chunkloop_field_components_swiginit", chunkloop_field_components_swiginit, METH_VARARGS, NULL},
	 { "new_diffractedplanewave", _wrap_new_diffractedplanewave, METH_VARARGS, NULL},
	 { "diffractedplanewave_get_g", _wrap_diffractedplanewave_get_g, METH_VARARGS, NULL},
	 { "diffractedplanewave_get_axis", _wrap_diffractedplanewave_get_axis, METH_VARARGS, NULL},
	 { "diffractedplanewave_get_s", _wrap_diffractedplanewave_get_s, METH_VARARGS, NULL},
	 { "diffractedplanewave_get_p", _wrap_diffractedplanewave_get_p, METH_VARARGS, NULL},
	 { "delete_diffractedplanewave", _wrap_delete_diffractedplanewave, METH_VARARGS, NULL},
	 { "diffractedplanewave_swigregister", diffractedplanewave_swigregister, METH_O, NULL},
	 { "diffractedplanewave_swiginit", diffractedplanewave_swiginit, METH_VARARGS, NULL},
	 { "new_gaussianbeam", _wrap_new_gaussianbeam, METH_VARARGS, NULL},
	 { "gaussianbeam_get_fields", _wrap_gaussianbeam_get_fields, METH_VARARGS, NULL},
	 { "gaussianbeam_get_E0", _wrap_gaussianbeam_get_E0, METH_VARARGS, NULL},
	 { "delete_gaussianbeam", _wrap_delete_gaussianbeam, METH_VARARGS, NULL},
	 { "gaussianbeam_swigregister", gaussianbeam_swigregister, METH_O, NULL},
	 { "gaussianbeam_swiginit", gaussianbeam_swiginit, METH_VARARGS, NULL},
	 { "fields_num_chunks_set", _wrap_fields_num_chunks_set, METH_VARARGS, NULL},
	 { "fields_num_chunks_get", _wrap_fields_num_chunks_get, METH_VARARGS, NULL},
	 { "fields_shared_chunks_set", _wrap_fields_shared_chunks_set, METH_VARARGS, NULL},
	 { "fields_shared_chunks_get", _wrap_fields_shared_chunks_get, METH_VARARGS, NULL},
	 { "fields_chunks_set", _wrap_fields_chunks_set, METH_VARARGS, NULL},
	 { "fields_chunks_get", _wrap_fields_chunks_get, METH_VARARGS, NULL},
	 { "fields_sources_set", _wrap_fields_sources_set, METH_VARARGS, NULL},
	 { "fields_sources_get", _wrap_fields_sources_get, METH_VARARGS, NULL},
	 { "fields_fluxes_set", _wrap_fields_fluxes_set, METH_VARARGS, NULL},
	 { "fields_fluxes_get", _wrap_fields_fluxes_get, METH_VARARGS, NULL},
	 { "fields_S_set", _wrap_fields_S_set, METH_VARARGS, NULL},
	 { "fields_S_get", _wrap_fields_S_get, METH_VARARGS, NULL},
	 { "fields_a_set", _wrap_fields_a_set, METH_VARARGS, NULL},
	 { "fields_a_get", _wrap_fields_a_get, METH_VARARGS, NULL},
	 { "fields_dt_set", _wrap_fields_dt_set, METH_VARARGS, NULL},
	 { "fields_dt_get", _wrap_fields_dt_get, METH_VARARGS, NULL},
	 { "fields_gv_set", _wrap_fields_gv_set, METH_VARARGS, NULL},
	 { "fields_gv_get", _wrap_fields_gv_get, METH_VARARGS, NULL},
	 { "fields_user_volume_set", _wrap_fields_user_volume_set, METH_VARARGS, NULL},
	 { "fields_user_volume_get", _wrap_fields_user_volume_get, METH_VARARGS, NULL},
	 { "fields_v_set", _wrap_fields_v_set, METH_VARARGS, NULL},
	 { "fields_v_get", _wrap_fields_v_get, METH_VARARGS, NULL},
	 { "fields_m_set", _wrap_fields_m_set, METH_VARARGS, NULL},
	 { "fields_m_get", _wrap_fields_m_get, METH_VARARGS, NULL},
	 { "fields_beta_set", _wrap_fields_beta_set, METH_VARARGS, NULL},
	 { "fields_beta_get", _wrap_fields_beta_get, METH_VARARGS, NULL},
	 { "fields_t_set", _wrap_fields_t_set, METH_VARARGS, NULL},
	 { "fields_t_get", _wrap_fields_t_get, METH_VARARGS, NULL},
	 { "fields_phasein_time_set", _wrap_fields_phasein_time_set, METH_VARARGS, NULL},
	 { "fields_phasein_time_get", _wrap_fields_phasein_time_get, METH_VARARGS, NULL},
	 { "fields_is_real_set", _wrap_fields_is_real_set, METH_VARARGS, NULL},
	 { "fields_is_real_get", _wrap_fields_is_real_get, METH_VARARGS, NULL},
	 { "fields_k_set", _wrap_fields_k_set, METH_VARARGS, NULL},
	 { "fields_k_get", _wrap_fields_k_get, METH_VARARGS, NULL},
	 { "fields_eikna_set", _wrap_fields_eikna_set, METH_VARARGS, NULL},
	 { "fields_eikna_get", _wrap_fields_eikna_get, METH_VARARGS, NULL},
	 { "fields_coskna_set", _wrap_fields_coskna_set, METH_VARARGS, NULL},
	 { "fields_coskna_get", _wrap_fields_coskna_get, METH_VARARGS, NULL},
	 { "fields_sinkna_set", _wrap_fields_sinkna_set, METH_VARARGS, NULL},
	 { "fields_sinkna_get", _wrap_fields_sinkna_get, METH_VARARGS, NULL},
	 { "fields_boundaries_set", _wrap_fields_boundaries_set, METH_VARARGS, NULL},
	 { "fields_boundaries_get", _wrap_fields_boundaries_get, METH_VARARGS, NULL},
	 { "fields_outdir_set", _wrap_fields_outdir_set, METH_VARARGS, NULL},
	 { "fields_outdir_get", _wrap_fields_outdir_get, METH_VARARGS, NULL},
	 { "fields_components_allocated_set", _wrap_fields_components_allocated_set, METH_VARARGS, NULL},
	 { "fields_components_allocated_get", _wrap_fields_components_allocated_get, METH_VARARGS, NULL},
	 { "fields_loop_tile_base_db_set", _wrap_fields_loop_tile_base_db_set, METH_VARARGS, NULL},
	 { "fields_loop_tile_base_db_get", _wrap_fields_loop_tile_base_db_get, METH_VARARGS, NULL},
	 { "fields_loop_tile_base_eh_set", _wrap_fields_loop_tile_base_eh_set, METH_VARARGS, NULL},
	 { "fields_loop_tile_base_eh_get", _wrap_fields_loop_tile_base_eh_get, METH_VARARGS, NULL},
	 { "new_fields", _wrap_new_fields, METH_VARARGS, NULL},
	 { "delete_fields", _wrap_delete_fields, METH_VARARGS, NULL},
	 { "fields_equal_layout", _wrap_fields_equal_layout, METH_VARARGS, NULL},
	 { "fields_use_real_fields", _wrap_fields_use_real_fields, METH_VARARGS, NULL},
	 { "fields_zero_fields", _wrap_fields_zero_fields, METH_VARARGS, NULL},
	 { "fields_remove_sources", _wrap_fields_remove_sources, METH_VARARGS, NULL},
	 { "fields_remove_susceptibilities", _wrap_fields_remove_susceptibilities, METH_VARARGS, NULL},
	 { "fields_remove_fluxes", _wrap_fields_remove_fluxes, METH_VARARGS, NULL},
	 { "fields_reset", _wrap_fields_reset, METH_VARARGS, NULL},
	 { "fields_log", _wrap_fields_log, METH_VARARGS, NULL},
	 { "fields_change_m", _wrap_fields_change_m, METH_VARARGS, NULL},
	 { "fields_time_spent_on", _wrap_fields_time_spent_on, METH_VARARGS, NULL},
	 { "fields_mean_time_spent_on", _wrap_fields_mean_time_spent_on, METH_VARARGS, NULL},
	 { "fields_print_times", _wrap_fields_print_times, METH_VARARGS, NULL},
	 { "fields_set_boundary", _wrap_fields_set_boundary, METH_VARARGS, NULL},
	 { "fields_use_bloch", _wrap_fields_use_bloch, METH_VARARGS, NULL},
	 { "fields_lattice_vector", _wrap_fields_lattice_vector, METH_VARARGS, NULL},
	 { "fields_update_eh", _wrap_fields_update_eh, METH_VARARGS, NULL},
	 { "fields_total_volume", _wrap_fields_total_volume, METH_VARARGS, NULL},
	 { "fields_dump", _wrap_fields_dump, METH_VARARGS, NULL},
	 { "fields_load", _wrap_fields_load, METH_VARARGS, NULL},
	 { "fields_output_hdf5", _wrap_fields_output_hdf5, METH_VARARGS, NULL},
	 { "fields_open_h5file", _wrap_fields_open_h5file, METH_VARARGS, NULL},
	 { "fields_h5file_name", _wrap_fields_h5file_name, METH_VARARGS, NULL},
	 { "fields_output_times", _wrap_fields_output_times, METH_VARARGS, NULL},
	 { "fields_get_array_slice_dimensions", _wrap_fields_get_array_slice_dimensions, METH_VARARGS, NULL},
	 { "fields_get_array_slice", _wrap_fields_get_array_slice, METH_VARARGS, NULL},
	 { "fields_get_complex_array_slice", _wrap_fields_get_complex_array_slice, METH_VARARGS, NULL},
	 { "fields_get_source_slice", _wrap_fields_get_source_slice, METH_VARARGS, NULL},
	 { "fields_do_get_array_slice", _wrap_fields_do_get_array_slice, METH_VARARGS, NULL},
	 { "fields_get_array_metadata", _wrap_fields_get_array_metadata, METH_VARARGS, NULL},
	 { "fields_last_step_output_wall_time_set", _wrap_fields_last_step_output_wall_time_set, METH_VARARGS, NULL},
	 { "fields_last_step_output_wall_time_get", _wrap_fields_last_step_output_wall_time_get, METH_VARARGS, NULL},
	 { "fields_last_step_output_t_set", _wrap_fields_last_step_output_t_set, METH_VARARGS, NULL},
	 { "fields_last_step_output_t_get", _wrap_fields_last_step_output_t_get, METH_VARARGS, NULL},
	 { "fields_step", _wrap_fields_step, METH_VARARGS, NULL},
	 { "fields_round_time", _wrap_fields_round_time, METH_VARARGS, NULL},
	 { "fields_time", _wrap_fields_time, METH_VARARGS, NULL},
	 { "fields_solve_cw", _wrap_fields_solve_cw, METH_VARARGS, NULL},
	 { "fields_last_source_time", _wrap_fields_last_source_time, METH_VARARGS, NULL},
	 { "fields_add_point_source", _wrap_fields_add_point_source, METH_VARARGS, NULL},
	 { "fields_add_volume_source", _wrap_fields_add_volume_source, METH_VARARGS, NULL},
	 { "fields_is_aniso2d", _wrap_fields_is_aniso2d, METH_VARARGS, NULL},
	 { "fields_require_source_components", _wrap_fields_require_source_components, METH_VARARGS, NULL},
	 { "fields__require_component", _wrap_fields__require_component, METH_VARARGS, NULL},
	 { "fields_require_component", _wrap_fields_require_component, METH_VARARGS, NULL},
	 { "fields_add_srcdata", _wrap_fields_add_srcdata, METH_VARARGS, NULL},
	 { "fields_register_src_time", _wrap_fields_register_src_time, METH_VARARGS, NULL},
	 { "fields_lookup_src_time", _wrap_fields_lookup_src_time, METH_VARARGS, NULL},
	 { "fields_get_eigenmode", _wrap_fields_get_eigenmode, METH_VARARGS, NULL},
	 { "fields_add_eigenmode_source", _wrap_fields_add_eigenmode_source, METH_VARARGS, NULL},
	 { "fields_get_eigenmode_coefficients", _wrap_fields_get_eigenmode_coefficients, METH_VARARGS, NULL},
	 { "fields_initialize_field", _wrap_fields_initialize_field, METH_VARARGS, NULL},
	 { "fields_initialize_with_nth_te", _wrap_fields_initialize_with_nth_te, METH_VARARGS, NULL},
	 { "fields_initialize_with_nth_tm", _wrap_fields_initialize_with_nth_tm, METH_VARARGS, NULL},
	 { "fields_initialize_with_n_te", _wrap_fields_initialize_with_n_te, METH_VARARGS, NULL},
	 { "fields_initialize_with_n_tm", _wrap_fields_initialize_with_n_tm, METH_VARARGS, NULL},
	 { "fields_phase_in_material", _wrap_fields_phase_in_material, METH_VARARGS, NULL},
	 { "fields_is_phasing", _wrap_fields_is_phasing, METH_VARARGS, NULL},
	 { "fields_vec2diel_floor", _wrap_fields_vec2diel_floor, METH_VARARGS, NULL},
	 { "fields_vec2diel_ceil", _wrap_fields_vec2diel_ceil, METH_VARARGS, NULL},
	 { "fields_loop_in_chunks", _wrap_fields_loop_in_chunks, METH_VARARGS, NULL},
	 { "fields_integrate", _wrap_fields_integrate, METH_VARARGS, NULL},
	 { "fields_integrate2", _wrap_fields_integrate2, METH_VARARGS, NULL},
	 { "fields_max_abs", _wrap_fields_max_abs, METH_VARARGS, NULL},
	 { "fields_add_dft_pt", _wrap_fields_add_dft_pt, METH_VARARGS, NULL},
	 { "fields_add_dft", _wrap_fields_add_dft, METH_VARARGS, NULL},
	 { "fields_update_dfts", _wrap_fields_update_dfts, METH_VARARGS, NULL},
	 { "fields_dft_norm", _wrap_fields_dft_norm, METH_VARARGS, NULL},
	 { "fields_dft_maxfreq", _wrap_fields_dft_maxfreq, METH_VARARGS, NULL},
	 { "fields_max_decimation", _wrap_fields_max_decimation, METH_VARARGS, NULL},
	 { "fields_clear_dft_monitors", _wrap_fields_clear_dft_monitors, METH_VARARGS, NULL},
	 { "fields_add_dft_flux", _wrap_fields_add_dft_flux, METH_VARARGS, NULL},
	 { "fields_add_dft_flux_box", _wrap_fields_add_dft_flux_box, METH_VARARGS, NULL},
	 { "fields_add_dft_flux_plane", _wrap_fields_add_dft_flux_plane, METH_VARARGS, NULL},
	 { "fields_add_mode_monitor", _wrap_fields_add_mode_monitor, METH_VARARGS, NULL},
	 { "fields_add_dft_fields", _wrap_fields_add_dft_fields, METH_VARARGS, NULL},
	 { "fields_process_dft_component", _wrap_fields_process_dft_component, METH_VARARGS, NULL},
	 { "fields_output_dft_components", _wrap_fields_output_dft_components, METH_VARARGS, NULL},
	 { "fields_output_dft", _wrap_fields_output_dft, METH_VARARGS, NULL},
	 { "fields_get_dft_array", _wrap_fields_get_dft_array, METH_VARARGS, NULL},
	 { "fields_get_overlap", _wrap_fields_get_overlap, METH_VARARGS, NULL},
	 { "fields_get_mode_flux_overlap", _wrap_fields_get_mode_flux_overlap, METH_VARARGS, NULL},
	 { "fields_get_mode_mode_overlap", _wrap_fields_get_mode_mode_overlap, METH_VARARGS, NULL},
	 { "fields_add_dft_energy", _wrap_fields_add_dft_energy, METH_VARARGS, NULL},
	 { "fields_add_dft_force", _wrap_fields_add_dft_force, METH_VARARGS, NULL},
	 { "fields_add_dft_near2far", _wrap_fields_add_dft_near2far, METH_VARARGS, NULL},
	 { "fields_get_inveps", _wrap_fields_get_inveps, METH_VARARGS, NULL},
	 { "fields_get_eps", _wrap_fields_get_eps, METH_VARARGS, NULL},
	 { "fields_get_mu", _wrap_fields_get_mu, METH_VARARGS, NULL},
	 { "fields_get_point", _wrap_fields_get_point, METH_VARARGS, NULL},
	 { "fields_get_new_point", _wrap_fields_get_new_point, METH_VARARGS, NULL},
	 { "fields_get_field_from_comp", _wrap_fields_get_field_from_comp, METH_VARARGS, NULL},
	 { "fields_dft_monitor_size", _wrap_fields_dft_monitor_size, METH_VARARGS, NULL},
	 { "fields_get_dft_component_dims", _wrap_fields_get_dft_component_dims, METH_VARARGS, NULL},
	 { "fields_synchronize_magnetic_fields", _wrap_fields_synchronize_magnetic_fields, METH_VARARGS, NULL},
	 { "fields_restore_magnetic_fields", _wrap_fields_restore_magnetic_fields, METH_VARARGS, NULL},
	 { "fields_energy_in_box", _wrap_fields_energy_in_box, METH_VARARGS, NULL},
	 { "fields_electric_energy_in_box", _wrap_fields_electric_energy_in_box, METH_VARARGS, NULL},
	 { "fields_magnetic_energy_in_box", _wrap_fields_magnetic_energy_in_box, METH_VARARGS, NULL},
	 { "fields_thermo_energy_in_box", _wrap_fields_thermo_energy_in_box, METH_VARARGS, NULL},
	 { "fields_total_energy", _wrap_fields_total_energy, METH_VARARGS, NULL},
	 { "fields_field_energy_in_box", _wrap_fields_field_energy_in_box, METH_VARARGS, NULL},
	 { "fields_field_energy", _wrap_fields_field_energy, METH_VARARGS, NULL},
	 { "fields_flux_in_box_wrongH", _wrap_fields_flux_in_box_wrongH, METH_VARARGS, NULL},
	 { "fields_flux_in_box", _wrap_fields_flux_in_box, METH_VARARGS, NULL},
	 { "fields_add_flux_vol", _wrap_fields_add_flux_vol, METH_VARARGS, NULL},
	 { "fields_add_flux_plane", _wrap_fields_add_flux_plane, METH_VARARGS, NULL},
	 { "fields_electric_energy_max_in_box", _wrap_fields_electric_energy_max_in_box, METH_VARARGS, NULL},
	 { "fields_modal_volume_in_box", _wrap_fields_modal_volume_in_box, METH_VARARGS, NULL},
	 { "fields_electric_sqr_weighted_integral", _wrap_fields_electric_sqr_weighted_integral, METH_VARARGS, NULL},
	 { "fields_electric_energy_weighted_integral", _wrap_fields_electric_energy_weighted_integral, METH_VARARGS, NULL},
	 { "fields_set_output_directory", _wrap_fields_set_output_directory, METH_VARARGS, NULL},
	 { "fields_count_volume", _wrap_fields_count_volume, METH_VARARGS, NULL},
	 { "fields_have_component", _wrap_fields_have_component, METH_VARARGS, NULL},
	 { "fields_max_eps", _wrap_fields_max_eps, METH_VARARGS, NULL},
	 { "fields_step_boundaries", _wrap_fields_step_boundaries, METH_VARARGS, NULL},
	 { "fields_process_incoming_chunk_data", _wrap_fields_process_incoming_chunk_data, METH_VARARGS, NULL},
	 { "fields_nosize_direction", _wrap_fields_nosize_direction, METH_VARARGS, NULL},
	 { "fields_normal_direction", _wrap_fields_normal_direction, METH_VARARGS, NULL},
	 { "fields_casimir_stress_dct_integral", _wrap_fields_casimir_stress_dct_integral, METH_VARARGS, NULL},
	 { "fields_set_solve_cw_omega", _wrap_fields_set_solve_cw_omega, METH_VARARGS, NULL},
	 { "fields_unset_solve_cw_omega", _wrap_fields_unset_solve_cw_omega, METH_VARARGS, NULL},
	 { "fields_get_field", _wrap_fields_get_field, METH_VARARGS, NULL},
	 { "fields_get_chi1inv", _wrap_fields_get_chi1inv, METH_VARARGS, NULL},
	 { "fields_locate_component_point", _wrap_fields_locate_component_point, METH_VARARGS, NULL},
	 { "fields_am_now_working_on", _wrap_fields_am_now_working_on, METH_VARARGS, NULL},
	 { "fields_finished_working", _wrap_fields_finished_working, METH_VARARGS, NULL},
	 { "fields_get_timing_data", _wrap_fields_get_timing_data, METH_VARARGS, NULL},
	 { "fields_reset_timers", _wrap_fields_reset_timers, METH_VARARGS, NULL},
	 { "fields_is_periodic", _wrap_fields_is_periodic, METH_VARARGS, NULL},
	 { "fields_swigregister", fields_swigregister, METH_O, NULL},
	 { "fields_swiginit", fields_swiginit, METH_VARARGS, NULL},
	 { "new_flux_vol", _wrap_new_flux_vol, METH_VARARGS, NULL},
	 { "delete_flux_vol", _wrap_delete_flux_vol, METH_VARARGS, NULL},
	 { "flux_vol_update_half", _wrap_flux_vol_update_half, METH_VARARGS, NULL},
	 { "flux_vol_update", _wrap_flux_vol_update, METH_VARARGS, NULL},
	 { "flux_vol_flux", _wrap_flux_vol_flux, METH_VARARGS, NULL},
	 { "flux_vol_next_set", _wrap_flux_vol_next_set, METH_VARARGS, NULL},
	 { "flux_vol_next_get", _wrap_flux_vol_next_get, METH_VARARGS, NULL},
	 { "flux_vol_swigregister", flux_vol_swigregister, METH_O, NULL},
	 { "flux_vol_swiginit", flux_vol_swiginit, METH_VARARGS, NULL},
	 { "make_output_directory", _wrap_make_output_directory, METH_VARARGS, NULL},
	 { "trash_output_directory", _wrap_trash_output_directory, METH_VARARGS, NULL},
	 { "delete_directory", _wrap_delete_directory, METH_VARARGS, NULL},
	 { "create_output_file", _wrap_create_output_file, METH_VARARGS, NULL},
	 { "do_harminv", _wrap_do_harminv, METH_VARARGS, NULL},
	 { "make_casimir_gfunc", _wrap_make_casimir_gfunc, METH_VARARGS, NULL},
	 { "make_casimir_gfunc_kz", _wrap_make_casimir_gfunc_kz, METH_VARARGS, NULL},
	 { "set_random_seed", _wrap_set_random_seed, METH_VARARGS, NULL},
	 { "restore_random_seed", _wrap_restore_random_seed, METH_VARARGS, NULL},
	 { "uniform_random", _wrap_uniform_random, METH_VARARGS, NULL},
	 { "gaussian_random", _wrap_gaussian_random, METH_VARARGS, NULL},
	 { "random_int", _wrap_random_int, METH_VARARGS, NULL},
	 { "BesselJ", _wrap_BesselJ, METH_VARARGS, NULL},
	 { "green2d", _wrap_green2d, METH_VARARGS, NULL},
	 { "green3d", _wrap_green3d, METH_VARARGS, NULL},
	 { "destroy_eigenmode_data", _wrap_destroy_eigenmode_data, METH_VARARGS, NULL},
	 { "eigenmode_amplitude", _wrap_eigenmode_amplitude, METH_VARARGS, NULL},
	 { "get_group_velocity", _wrap_get_group_velocity, METH_VARARGS, NULL},
	 { "get_k", _wrap_get_k, METH_VARARGS, NULL},
	 { "linear_interpolate", _wrap_linear_interpolate, METH_VARARGS, NULL},
	 { "split_plane_dir_set", _wrap_split_plane_dir_set, METH_VARARGS, NULL},
	 { "split_plane_dir_get", _wrap_split_plane_dir_get, METH_VARARGS, NULL},
	 { "split_plane_pos_set", _wrap_split_plane_pos_set, METH_VARARGS, NULL},
	 { "split_plane_pos_get", _wrap_split_plane_pos_get, METH_VARARGS, NULL},
	 { "new_split_plane", _wrap_new_split_plane, METH_VARARGS, NULL},
	 { "delete_split_plane", _wrap_delete_split_plane, METH_VARARGS, NULL},
	 { "split_plane_swigregister", split_plane_swigregister, METH_O, NULL},
	 { "split_plane_swiginit", split_plane_swiginit, METH_VARARGS, NULL},
	 { "new_binary_partition", _wrap_new_binary_partition, METH_VARARGS, NULL},
	 { "binary_partition_is_leaf", _wrap_binary_partition_is_leaf, METH_VARARGS, NULL},
	 { "binary_partition_get_proc_id", _wrap_binary_partition_get_proc_id, METH_VARARGS, NULL},
	 { "binary_partition_get_plane", _wrap_binary_partition_get_plane, METH_VARARGS, NULL},
	 { "binary_partition_left_tree", _wrap_binary_partition_left_tree, METH_VARARGS, NULL},
	 { "binary_partition_right_tree", _wrap_binary_partition_right_tree, METH_VARARGS, NULL},
	 { "delete_binary_partition", _wrap_delete_binary_partition, METH_VARARGS, NULL},
	 { "binary_partition_swigregister", binary_partition_swigregister, METH_O, NULL},
	 { "binary_partition_swiginit", binary_partition_swiginit, METH_VARARGS, NULL},
	 { "set_zero_subnormals", _wrap_set_zero_subnormals, METH_VARARGS, NULL},
	 { "setup", _wrap_setup, METH_VARARGS, NULL},
	 { "split_into_tiles", _wrap_split_into_tiles, METH_VARARGS, NULL},
	 { "check_tiles", _wrap_check_tiles, METH_VARARGS, NULL},
	 { "wall_time", _wrap_wall_time, METH_VARARGS, NULL},
	 { "new_initialize", _wrap_new_initialize, METH_VARARGS, NULL},
	 { "delete_initialize", _wrap_delete_initialize, METH_VARARGS, NULL},
	 { "initialize_elapsed_time", _wrap_initialize_elapsed_time, METH_VARARGS, NULL},
	 { "initialize_swigregister", initialize_swigregister, METH_O, NULL},
	 { "initialize_swiginit", initialize_swiginit, METH_VARARGS, NULL},
	 { "all_wait", _wrap_all_wait, METH_VARARGS, NULL},
	 { "count_processors", _wrap_count_processors, METH_VARARGS, NULL},
	 { "my_rank", _wrap_my_rank, METH_VARARGS, NULL},
	 { "am_really_master", _wrap_am_really_master, METH_VARARGS, NULL},
	 { "am_master", _wrap_am_master, METH_VARARGS, NULL},
	 { "with_mpi", _wrap_with_mpi, METH_VARARGS, NULL},
	 { "send", _wrap_send, METH_VARARGS, NULL},
	 { "broadcast", _wrap_broadcast, METH_VARARGS, NULL},
	 { "max_to_master", _wrap_max_to_master, METH_VARARGS, NULL},
	 { "max_to_all", _wrap_max_to_all, METH_VARARGS, NULL},
	 { "min_to_all", _wrap_min_to_all, METH_VARARGS, NULL},
	 { "partial_sum_to_all", _wrap_partial_sum_to_all, METH_VARARGS, NULL},
	 { "sum_to_all", _wrap_sum_to_all, METH_VARARGS, NULL},
	 { "sum_to_master", _wrap_sum_to_master, METH_VARARGS, NULL},
	 { "or_to_all", _wrap_or_to_all, METH_VARARGS, NULL},
	 { "bw_or_to_all", _wrap_bw_or_to_all, METH_VARARGS, NULL},
	 { "and_to_all", _wrap_and_to_all, METH_VARARGS, NULL},
	 { "master_printf", _wrap_master_printf, METH_VARARGS, NULL},
	 { "master_printf_stderr", _wrap_master_printf_stderr, METH_VARARGS, NULL},
	 { "debug_printf", _wrap_debug_printf, METH_VARARGS, NULL},
	 { "master_fprintf", _wrap_master_fprintf, METH_VARARGS, NULL},
	 { "master_fopen", _wrap_master_fopen, METH_VARARGS, NULL},
	 { "master_fclose", _wrap_master_fclose, METH_VARARGS, NULL},
	 { "set_meep_printf_callback", _wrap_set_meep_printf_callback, METH_VARARGS, NULL},
	 { "set_meep_printf_stderr_callback", _wrap_set_meep_printf_stderr_callback, METH_VARARGS, NULL},
	 { "begin_critical_section", _wrap_begin_critical_section, METH_VARARGS, NULL},
	 { "end_critical_section", _wrap_end_critical_section, METH_VARARGS, NULL},
	 { "divide_parallel_processes", _wrap_divide_parallel_processes, METH_VARARGS, NULL},
	 { "begin_global_communications", _wrap_begin_global_communications, METH_VARARGS, NULL},
	 { "end_global_communications", _wrap_end_global_communications, METH_VARARGS, NULL},
	 { "end_divide_parallel", _wrap_end_divide_parallel, METH_VARARGS, NULL},
	 { "my_global_rank", _wrap_my_global_rank, METH_VARARGS, NULL},
	 { "dft_data_num_freqs_set", _wrap_dft_data_num_freqs_set, METH_VARARGS, NULL},
	 { "dft_data_num_freqs_get", _wrap_dft_data_num_freqs_get, METH_VARARGS, NULL},
	 { "dft_data_num_components_set", _wrap_dft_data_num_components_set, METH_VARARGS, NULL},
	 { "dft_data_num_components_get", _wrap_dft_data_num_components_get, METH_VARARGS, NULL},
	 { "dft_data_vols_set", _wrap_dft_data_vols_set, METH_VARARGS, NULL},
	 { "dft_data_vols_get", _wrap_dft_data_vols_get, METH_VARARGS, NULL},
	 { "new_dft_data", _wrap_new_dft_data, METH_VARARGS, NULL},
	 { "delete_dft_data", _wrap_delete_dft_data, METH_VARARGS, NULL},
	 { "dft_data_swigregister", dft_data_swigregister, METH_O, NULL},
	 { "dft_data_swiginit", dft_data_swiginit, METH_VARARGS, NULL},
	 { "fragment_stats_tol_get", _wrap_fragment_stats_tol_get, METH_VARARGS, NULL},
	 { "fragment_stats_tol_set", _wrap_fragment_stats_tol_set, METH_VARARGS, NULL},
	 { "fragment_stats_maxeval_get", _wrap_fragment_stats_maxeval_get, METH_VARARGS, NULL},
	 { "fragment_stats_maxeval_set", _wrap_fragment_stats_maxeval_set, METH_VARARGS, NULL},
	 { "fragment_stats_resolution_get", _wrap_fragment_stats_resolution_get, METH_VARARGS, NULL},
	 { "fragment_stats_resolution_set", _wrap_fragment_stats_resolution_set, METH_VARARGS, NULL},
	 { "fragment_stats_dims_get", _wrap_fragment_stats_dims_get, METH_VARARGS, NULL},
	 { "fragment_stats_dims_set", _wrap_fragment_stats_dims_set, METH_VARARGS, NULL},
	 { "fragment_stats_geom_get", _wrap_fragment_stats_geom_get, METH_VARARGS, NULL},
	 { "fragment_stats_geom_set", _wrap_fragment_stats_geom_set, METH_VARARGS, NULL},
	 { "fragment_stats_dft_data_list_get", _wrap_fragment_stats_dft_data_list_get, METH_VARARGS, NULL},
	 { "fragment_stats_dft_data_list_set", _wrap_fragment_stats_dft_data_list_set, METH_VARARGS, NULL},
	 { "fragment_stats_pml_1d_vols_get", _wrap_fragment_stats_pml_1d_vols_get, METH_VARARGS, NULL},
	 { "fragment_stats_pml_1d_vols_set", _wrap_fragment_stats_pml_1d_vols_set, METH_VARARGS, NULL},
	 { "fragment_stats_pml_2d_vols_get", _wrap_fragment_stats_pml_2d_vols_get, METH_VARARGS, NULL},
	 { "fragment_stats_pml_2d_vols_set", _wrap_fragment_stats_pml_2d_vols_set, METH_VARARGS, NULL},
	 { "fragment_stats_pml_3d_vols_get", _wrap_fragment_stats_pml_3d_vols_get, METH_VARARGS, NULL},
	 { "fragment_stats_pml_3d_vols_set", _wrap_fragment_stats_pml_3d_vols_set, METH_VARARGS, NULL},
	 { "fragment_stats_absorber_vols_get", _wrap_fragment_stats_absorber_vols_get, METH_VARARGS, NULL},
	 { "fragment_stats_absorber_vols_set", _wrap_fragment_stats_absorber_vols_set, METH_VARARGS, NULL},
	 { "fragment_stats_extra_materials_get", _wrap_fragment_stats_extra_materials_get, METH_VARARGS, NULL},
	 { "fragment_stats_extra_materials_set", _wrap_fragment_stats_extra_materials_set, METH_VARARGS, NULL},
	 { "fragment_stats_split_chunks_evenly_get", _wrap_fragment_stats_split_chunks_evenly_get, METH_VARARGS, NULL},
	 { "fragment_stats_split_chunks_evenly_set", _wrap_fragment_stats_split_chunks_evenly_set, METH_VARARGS, NULL},
	 { "fragment_stats_eps_averaging_get", _wrap_fragment_stats_eps_averaging_get, METH_VARARGS, NULL},
	 { "fragment_stats_eps_averaging_set", _wrap_fragment_stats_eps_averaging_set, METH_VARARGS, NULL},
	 { "fragment_stats_has_non_medium_material", _wrap_fragment_stats_has_non_medium_material, METH_VARARGS, NULL},
	 { "fragment_stats_num_anisotropic_eps_pixels_set", _wrap_fragment_stats_num_anisotropic_eps_pixels_set, METH_VARARGS, NULL},
	 { "fragment_stats_num_anisotropic_eps_pixels_get", _wrap_fragment_stats_num_anisotropic_eps_pixels_get, METH_VARARGS, NULL},
	 { "fragment_stats_num_anisotropic_mu_pixels_set", _wrap_fragment_stats_num_anisotropic_mu_pixels_set, METH_VARARGS, NULL},
	 { "fragment_stats_num_anisotropic_mu_pixels_get", _wrap_fragment_stats_num_anisotropic_mu_pixels_get, METH_VARARGS, NULL},
	 { "fragment_stats_num_nonlinear_pixels_set", _wrap_fragment_stats_num_nonlinear_pixels_set, METH_VARARGS, NULL},
	 { "fragment_stats_num_nonlinear_pixels_get", _wrap_fragment_stats_num_nonlinear_pixels_get, METH_VARARGS, NULL},
	 { "fragment_stats_num_susceptibility_pixels_set", _wrap_fragment_stats_num_susceptibility_pixels_set, METH_VARARGS, NULL},
	 { "fragment_stats_num_susceptibility_pixels_get", _wrap_fragment_stats_num_susceptibility_pixels_get, METH_VARARGS, NULL},
	 { "fragment_stats_num_nonzero_conductivity_pixels_set", _wrap_fragment_stats_num_nonzero_conductivity_pixels_set, METH_VARARGS, NULL},
	 { "fragment_stats_num_nonzero_conductivity_pixels_get", _wrap_fragment_stats_num_nonzero_conductivity_pixels_get, METH_VARARGS, NULL},
	 { "fragment_stats_num_1d_pml_pixels_set", _wrap_fragment_stats_num_1d_pml_pixels_set, METH_VARARGS, NULL},
	 { "fragment_stats_num_1d_pml_pixels_get", _wrap_fragment_stats_num_1d_pml_pixels_get, METH_VARARGS, NULL},
	 { "fragment_stats_num_2d_pml_pixels_set", _wrap_fragment_stats_num_2d_pml_pixels_set, METH_VARARGS, NULL},
	 { "fragment_stats_num_2d_pml_pixels_get", _wrap_fragment_stats_num_2d_pml_pixels_get, METH_VARARGS, NULL},
	 { "fragment_stats_num_3d_pml_pixels_set", _wrap_fragment_stats_num_3d_pml_pixels_set, METH_VARARGS, NULL},
	 { "fragment_stats_num_3d_pml_pixels_get", _wrap_fragment_stats_num_3d_pml_pixels_get, METH_VARARGS, NULL},
	 { "fragment_stats_num_dft_pixels_set", _wrap_fragment_stats_num_dft_pixels_set, METH_VARARGS, NULL},
	 { "fragment_stats_num_dft_pixels_get", _wrap_fragment_stats_num_dft_pixels_get, METH_VARARGS, NULL},
	 { "fragment_stats_num_pixels_in_box_set", _wrap_fragment_stats_num_pixels_in_box_set, METH_VARARGS, NULL},
	 { "fragment_stats_num_pixels_in_box_get", _wrap_fragment_stats_num_pixels_in_box_get, METH_VARARGS, NULL},
	 { "fragment_stats_box_set", _wrap_fragment_stats_box_set, METH_VARARGS, NULL},
	 { "fragment_stats_box_get", _wrap_fragment_stats_box_get, METH_VARARGS, NULL},
	 { "new_fragment_stats", _wrap_new_fragment_stats, METH_VARARGS, NULL},
	 { "fragment_stats_compute", _wrap_fragment_stats_compute, METH_VARARGS, NULL},
	 { "fragment_stats_cost", _wrap_fragment_stats_cost, METH_VARARGS, NULL},
	 { "fragment_stats_print_stats", _wrap_fragment_stats_print_stats, METH_VARARGS, NULL},
	 { "delete_fragment_stats", _wrap_delete_fragment_stats, METH_VARARGS, NULL},
	 { "fragment_stats_swigregister", fragment_stats_swigregister, METH_O, NULL},
	 { "fragment_stats_swiginit", fragment_stats_swiginit, METH_VARARGS, NULL},
	 { "compute_fragment_stats", _wrap_compute_fragment_stats, METH_VARARGS, NULL},
	 { "absorber_thickness_set", _wrap_absorber_thickness_set, METH_VARARGS, NULL},
	 { "absorber_thickness_get", _wrap_absorber_thickness_get, METH_VARARGS, NULL},
	 { "absorber_direction_set", _wrap_absorber_direction_set, METH_VARARGS, NULL},
	 { "absorber_direction_get", _wrap_absorber_direction_get, METH_VARARGS, NULL},
	 { "absorber_side_set", _wrap_absorber_side_set, METH_VARARGS, NULL},
	 { "absorber_side_get", _wrap_absorber_side_get, METH_VARARGS, NULL},
	 { "absorber_R_asymptotic_set", _wrap_absorber_R_asymptotic_set, METH_VARARGS, NULL},
	 { "absorber_R_asymptotic_get", _wrap_absorber_R_asymptotic_get, METH_VARARGS, NULL},
	 { "absorber_mean_stretch_set", _wrap_absorber_mean_stretch_set, METH_VARARGS, NULL},
	 { "absorber_mean_stretch_get", _wrap_absorber_mean_stretch_get, METH_VARARGS, NULL},
	 { "absorber_pml_profile_set", _wrap_absorber_pml_profile_set, METH_VARARGS, NULL},
	 { "absorber_pml_profile_get", _wrap_absorber_pml_profile_get, METH_VARARGS, NULL},
	 { "absorber_pml_profile_data_set", _wrap_absorber_pml_profile_data_set, METH_VARARGS, NULL},
	 { "absorber_pml_profile_data_get", _wrap_absorber_pml_profile_data_get, METH_VARARGS, NULL},
	 { "new_absorber", _wrap_new_absorber, METH_VARARGS, NULL},
	 { "delete_absorber", _wrap_delete_absorber, METH_VARARGS, NULL},
	 { "absorber_swigregister", absorber_swigregister, METH_O, NULL},
	 { "absorber_swiginit", absorber_swiginit, METH_VARARGS, NULL},
	 { "create_absorber_list", _wrap_create_absorber_list, METH_VARARGS, NULL},
	 { "destroy_absorber_list", _wrap_destroy_absorber_list, METH_VARARGS, NULL},
	 { "add_absorbing_layer", _wrap_add_absorbing_layer, METH_VARARGS, NULL},
	 { "make_vector3", _wrap_make_vector3, METH_VARARGS, NULL},
	 { "symm_matrix_m00_set", _wrap_symm_matrix_m00_set, METH_VARARGS, NULL},
	 { "symm_matrix_m00_get", _wrap_symm_matrix_m00_get, METH_VARARGS, NULL},
	 { "symm_matrix_m01_set", _wrap_symm_matrix_m01_set, METH_VARARGS, NULL},
	 { "symm_matrix_m01_get", _wrap_symm_matrix_m01_get, METH_VARARGS, NULL},
	 { "symm_matrix_m02_set", _wrap_symm_matrix_m02_set, METH_VARARGS, NULL},
	 { "symm_matrix_m02_get", _wrap_symm_matrix_m02_get, METH_VARARGS, NULL},
	 { "symm_matrix_m11_set", _wrap_symm_matrix_m11_set, METH_VARARGS, NULL},
	 { "symm_matrix_m11_get", _wrap_symm_matrix_m11_get, METH_VARARGS, NULL},
	 { "symm_matrix_m12_set", _wrap_symm_matrix_m12_set, METH_VARARGS, NULL},
	 { "symm_matrix_m12_get", _wrap_symm_matrix_m12_get, METH_VARARGS, NULL},
	 { "symm_matrix_m22_set", _wrap_symm_matrix_m22_set, METH_VARARGS, NULL},
	 { "symm_matrix_m22_get", _wrap_symm_matrix_m22_get, METH_VARARGS, NULL},
	 { "new_symm_matrix", _wrap_new_symm_matrix, METH_VARARGS, NULL},
	 { "delete_symm_matrix", _wrap_delete_symm_matrix, METH_VARARGS, NULL},
	 { "symm_matrix_swigregister", symm_matrix_swigregister, METH_O, NULL},
	 { "symm_matrix_swiginit", symm_matrix_swiginit, METH_VARARGS, NULL},
	 { "pol_user_s_set", _wrap_pol_user_s_set, METH_VARARGS, NULL},
	 { "pol_user_s_get", _wrap_pol_user_s_get, METH_VARARGS, NULL},
	 { "pol_next_set", _wrap_pol_next_set, METH_VARARGS, NULL},
	 { "pol_next_get", _wrap_pol_next_get, METH_VARARGS, NULL},
	 { "new_pol", _wrap_new_pol, METH_VARARGS, NULL},
	 { "delete_pol", _wrap_delete_pol, METH_VARARGS, NULL},
	 { "pol_swigregister", pol_swigregister, METH_O, NULL},
	 { "pol_swiginit", pol_swiginit, METH_VARARGS, NULL},
	 { "cond_profile_L_set", _wrap_cond_profile_L_set, METH_VARARGS, NULL},
	 { "cond_profile_L_get", _wrap_cond_profile_L_get, METH_VARARGS, NULL},
	 { "cond_profile_N_set", _wrap_cond_profile_N_set, METH_VARARGS, NULL},
	 { "cond_profile_N_get", _wrap_cond_profile_N_get, METH_VARARGS, NULL},
	 { "cond_profile_prof_set", _wrap_cond_profile_prof_set, METH_VARARGS, NULL},
	 { "cond_profile_prof_get", _wrap_cond_profile_prof_get, METH_VARARGS, NULL},
	 { "new_cond_profile", _wrap_new_cond_profile, METH_VARARGS, NULL},
	 { "delete_cond_profile", _wrap_delete_cond_profile, METH_VARARGS, NULL},
	 { "cond_profile_swigregister", cond_profile_swigregister, METH_O, NULL},
	 { "cond_profile_swiginit", cond_profile_swiginit, METH_VARARGS, NULL},
	 { "geom_epsilon_u_p_set", _wrap_geom_epsilon_u_p_set, METH_VARARGS, NULL},
	 { "geom_epsilon_u_p_get", _wrap_geom_epsilon_u_p_get, METH_VARARGS, NULL},
	 { "geom_epsilon_geometry_tree_set", _wrap_geom_epsilon_geometry_tree_set, METH_VARARGS, NULL},
	 { "geom_epsilon_geometry_tree_get", _wrap_geom_epsilon_geometry_tree_get, METH_VARARGS, NULL},
	 { "geom_epsilon_restricted_tree_set", _wrap_geom_epsilon_restricted_tree_set, METH_VARARGS, NULL},
	 { "geom_epsilon_restricted_tree_get", _wrap_geom_epsilon_restricted_tree_get, METH_VARARGS, NULL},
	 { "geom_epsilon_geometry_set", _wrap_geom_epsilon_geometry_set, METH_VARARGS, NULL},
	 { "geom_epsilon_geometry_get", _wrap_geom_epsilon_geometry_get, METH_VARARGS, NULL},
	 { "geom_epsilon_cond_set", _wrap_geom_epsilon_cond_set, METH_VARARGS, NULL},
	 { "geom_epsilon_cond_get", _wrap_geom_epsilon_cond_get, METH_VARARGS, NULL},
	 { "geom_epsilon_tol_set", _wrap_geom_epsilon_tol_set, METH_VARARGS, NULL},
	 { "geom_epsilon_tol_get", _wrap_geom_epsilon_tol_get, METH_VARARGS, NULL},
	 { "geom_epsilon_maxeval_set", _wrap_geom_epsilon_maxeval_set, METH_VARARGS, NULL},
	 { "geom_epsilon_maxeval_get", _wrap_geom_epsilon_maxeval_get, METH_VARARGS, NULL},
	 { "new_geom_epsilon", _wrap_new_geom_epsilon, METH_VARARGS, NULL},
	 { "delete_geom_epsilon", _wrap_delete_geom_epsilon, METH_VARARGS, NULL},
	 { "geom_epsilon_set_cond_profile", _wrap_geom_epsilon_set_cond_profile, METH_VARARGS, NULL},
	 { "geom_epsilon_set_volume", _wrap_geom_epsilon_set_volume, METH_VARARGS, NULL},
	 { "geom_epsilon_unset_volume", _wrap_geom_epsilon_unset_volume, METH_VARARGS, NULL},
	 { "geom_epsilon_has_chi", _wrap_geom_epsilon_has_chi, METH_VARARGS, NULL},
	 { "geom_epsilon_has_chi3", _wrap_geom_epsilon_has_chi3, METH_VARARGS, NULL},
	 { "geom_epsilon_has_chi2", _wrap_geom_epsilon_has_chi2, METH_VARARGS, NULL},
	 { "geom_epsilon_chi", _wrap_geom_epsilon_chi, METH_VARARGS, NULL},
	 { "geom_epsilon_chi3", _wrap_geom_epsilon_chi3, METH_VARARGS, NULL},
	 { "geom_epsilon_chi2", _wrap_geom_epsilon_chi2, METH_VARARGS, NULL},
	 { "geom_epsilon_has_mu", _wrap_geom_epsilon_has_mu, METH_VARARGS, NULL},
	 { "geom_epsilon_has_conductivity", _wrap_geom_epsilon_has_conductivity, METH_VARARGS, NULL},
	 { "geom_epsilon_conductivity", _wrap_geom_epsilon_conductivity, METH_VARARGS, NULL},
	 { "geom_epsilon_chi1p1", _wrap_geom_epsilon_chi1p1, METH_VARARGS, NULL},
	 { "geom_epsilon_eff_chi1inv_row", _wrap_geom_epsilon_eff_chi1inv_row, METH_VARARGS, NULL},
	 { "geom_epsilon_eff_chi1inv_matrix", _wrap_geom_epsilon_eff_chi1inv_matrix, METH_VARARGS, NULL},
	 { "geom_epsilon_fallback_chi1inv_row", _wrap_geom_epsilon_fallback_chi1inv_row, METH_VARARGS, NULL},
	 { "geom_epsilon_sigma_row", _wrap_geom_epsilon_sigma_row, METH_VARARGS, NULL},
	 { "geom_epsilon_add_susceptibilities", _wrap_geom_epsilon_add_susceptibilities, METH_VARARGS, NULL},
	 { "geom_epsilon_get_material_pt", _wrap_geom_epsilon_get_material_pt, METH_VARARGS, NULL},
	 { "geom_epsilon_swigregister", geom_epsilon_swigregister, METH_O, NULL},
	 { "geom_epsilon_swiginit", geom_epsilon_swiginit, METH_VARARGS, NULL},
	 { "set_dimensions", _wrap_set_dimensions, METH_VARARGS, NULL},
	 { "make_geom_epsilon", _wrap_make_geom_epsilon, METH_VARARGS, NULL},
	 { "set_materials_from_geometry", _wrap_set_materials_from_geometry, METH_VARARGS, NULL},
	 { "make_dielectric", _wrap_make_dielectric, METH_VARARGS, NULL},
	 { "make_user_material", _wrap_make_user_material, METH_VARARGS, NULL},
	 { "make_file_material", _wrap_make_file_material, METH_VARARGS, NULL},
	 { "make_material_grid", _wrap_make_material_grid, METH_VARARGS, NULL},
	 { "vec_to_vector3", _wrap_vec_to_vector3, METH_VARARGS, NULL},
	 { "vector3_to_vec", _wrap_vector3_to_vec, METH_VARARGS, NULL},
	 { "set_default_material", _wrap_set_default_material, METH_VARARGS, NULL},
	 { "unset_default_material", _wrap_unset_default_material, METH_VARARGS, NULL},
	 { "epsilon_material_grid", _wrap_epsilon_material_grid, METH_VARARGS, NULL},
	 { "epsilon_file_material", _wrap_epsilon_file_material, METH_VARARGS, NULL},
	 { "material_free", _wrap_material_free, METH_VARARGS, NULL},
	 { "is_material_grid", _wrap_is_material_grid, METH_VARARGS, NULL},
	 { "gv2box", _wrap_gv2box, METH_VARARGS, NULL},
	 { "get_epsilon_grid", _wrap_get_epsilon_grid, METH_VARARGS, NULL},
	 { "init_libctl", _wrap_init_libctl, METH_VARARGS, NULL},
	 { "update_weights", _wrap_update_weights, METH_VARARGS, NULL},
	 { "matgrid_grad", _wrap_matgrid_grad, METH_VARARGS, NULL},
	 { "material_grid_grad", _wrap_material_grid_grad, METH_VARARGS, NULL},
	 { "matgrid_val", _wrap_matgrid_val, METH_VARARGS, NULL},
	 { "material_grid_val", _wrap_material_grid_val, METH_VARARGS, NULL},
	 { "calculate_tree", _wrap_calculate_tree, METH_VARARGS, NULL},
	 { "material_grids_addgradient", _wrap_material_grids_addgradient, METH_VARARGS, NULL},
	 { "with_libGDSII", _wrap_with_libGDSII, METH_VARARGS, NULL},
	 { "set_geometry_from_GDSII", _wrap_set_geometry_from_GDSII, METH_VARARGS, NULL},
	 { "get_GDSII_prisms", _wrap_get_GDSII_prisms, METH_VARARGS, NULL},
	 { "get_GDSII_prism", _wrap_get_GDSII_prism, METH_VARARGS, NULL},
	 { "get_GDSII_volume", _wrap_get_GDSII_volume, METH_VARARGS, NULL},
	 { "get_GDSII_layers", _wrap_get_GDSII_layers, METH_VARARGS, NULL},
	 { "new_custom_py_src_time", _wrap_new_custom_py_src_time, METH_VARARGS, NULL},
	 { "delete_custom_py_src_time", _wrap_delete_custom_py_src_time, METH_VARARGS, NULL},
	 { "custom_py_src_time_current", _wrap_custom_py_src_time_current, METH_VARARGS, NULL},
	 { "custom_py_src_time_dipole", _wrap_custom_py_src_time_dipole, METH_VARARGS, NULL},
	 { "custom_py_src_time_last_time", _wrap_custom_py_src_time_last_time, METH_VARARGS, NULL},
	 { "custom_py_src_time_clone", _wrap_custom_py_src_time_clone, METH_VARARGS, NULL},
	 { "custom_py_src_time_is_equal", _wrap_custom_py_src_time_is_equal, METH_VARARGS, NULL},
	 { "custom_py_src_time_frequency", _wrap_custom_py_src_time_frequency, METH_VARARGS, NULL},
	 { "custom_py_src_time_set_frequency", _wrap_custom_py_src_time_set_frequency, METH_VARARGS, NULL},
	 { "custom_py_src_time_get_fwidth", _wrap_custom_py_src_time_get_fwidth, METH_VARARGS, NULL},
	 { "custom_py_src_time_set_fwidth", _wrap_custom_py_src_time_set_fwidth, METH_VARARGS, NULL},
	 { "custom_py_src_time_swigregister", custom_py_src_time_swigregister, METH_O, NULL},
	 { "custom_py_src_time_swiginit", custom_py_src_time_swiginit, METH_VARARGS, NULL},
	 { "near_src_data_iterator", _wrap_near_src_data_iterator, METH_VARARGS, NULL},
	 { "near_src_data___nonzero__", _wrap_near_src_data___nonzero__, METH_VARARGS, NULL},
	 { "near_src_data___bool__", _wrap_near_src_data___bool__, METH_VARARGS, NULL},
	 { "near_src_data___len__", _wrap_near_src_data___len__, METH_VARARGS, NULL},
	 { "near_src_data___getslice__", _wrap_near_src_data___getslice__, METH_VARARGS, NULL},
	 { "near_src_data___setslice__", _wrap_near_src_data___setslice__, METH_VARARGS, NULL},
	 { "near_src_data___delslice__", _wrap_near_src_data___delslice__, METH_VARARGS, NULL},
	 { "near_src_data___delitem__", _wrap_near_src_data___delitem__, METH_VARARGS, NULL},
	 { "near_src_data___getitem__", _wrap_near_src_data___getitem__, METH_VARARGS, NULL},
	 { "near_src_data___setitem__", _wrap_near_src_data___setitem__, METH_VARARGS, NULL},
	 { "near_src_data_pop", _wrap_near_src_data_pop, METH_VARARGS, NULL},
	 { "near_src_data_append", _wrap_near_src_data_append, METH_VARARGS, NULL},
	 { "near_src_data_empty", _wrap_near_src_data_empty, METH_VARARGS, NULL},
	 { "near_src_data_size", _wrap_near_src_data_size, METH_VARARGS, NULL},
	 { "near_src_data_swap", _wrap_near_src_data_swap, METH_VARARGS, NULL},
	 { "near_src_data_begin", _wrap_near_src_data_begin, METH_VARARGS, NULL},
	 { "near_src_data_end", _wrap_near_src_data_end, METH_VARARGS, NULL},
	 { "near_src_data_rbegin", _wrap_near_src_data_rbegin, METH_VARARGS, NULL},
	 { "near_src_data_rend", _wrap_near_src_data_rend, METH_VARARGS, NULL},
	 { "near_src_data_clear", _wrap_near_src_data_clear, METH_VARARGS, NULL},
	 { "near_src_data_get_allocator", _wrap_near_src_data_get_allocator, METH_VARARGS, NULL},
	 { "near_src_data_pop_back", _wrap_near_src_data_pop_back, METH_VARARGS, NULL},
	 { "near_src_data_erase", _wrap_near_src_data_erase, METH_VARARGS, NULL},
	 { "new_near_src_data", _wrap_new_near_src_data, METH_VARARGS, NULL},
	 { "near_src_data_push_back", _wrap_near_src_data_push_back, METH_VARARGS, NULL},
	 { "near_src_data_front", _wrap_near_src_data_front, METH_VARARGS, NULL},
	 { "near_src_data_back", _wrap_near_src_data_back, METH_VARARGS, NULL},
	 { "near_src_data_assign", _wrap_near_src_data_assign, METH_VARARGS, NULL},
	 { "near_src_data_resize", _wrap_near_src_data_resize, METH_VARARGS, NULL},
	 { "near_src_data_insert", _wrap_near_src_data_insert, METH_VARARGS, NULL},
	 { "near_src_data_reserve", _wrap_near_src_data_reserve, METH_VARARGS, NULL},
	 { "near_src_data_capacity", _wrap_near_src_data_capacity, METH_VARARGS, NULL},
	 { "delete_near_src_data", _wrap_delete_near_src_data, METH_VARARGS, NULL},
	 { "near_src_data_swigregister", near_src_data_swigregister, METH_O, NULL},
	 { "near_src_data_swiginit", near_src_data_swiginit, METH_VARARGS, NULL},
	 { "ComplexVector_iterator", _wrap_ComplexVector_iterator, METH_VARARGS, NULL},
	 { "ComplexVector___nonzero__", _wrap_ComplexVector___nonzero__, METH_VARARGS, NULL},
	 { "ComplexVector___bool__", _wrap_ComplexVector___bool__, METH_VARARGS, NULL},
	 { "ComplexVector___len__", _wrap_ComplexVector___len__, METH_VARARGS, NULL},
	 { "ComplexVector___getslice__", _wrap_ComplexVector___getslice__, METH_VARARGS, NULL},
	 { "ComplexVector___setslice__", _wrap_ComplexVector___setslice__, METH_VARARGS, NULL},
	 { "ComplexVector___delslice__", _wrap_ComplexVector___delslice__, METH_VARARGS, NULL},
	 { "ComplexVector___delitem__", _wrap_ComplexVector___delitem__, METH_VARARGS, NULL},
	 { "ComplexVector___getitem__", _wrap_ComplexVector___getitem__, METH_VARARGS, NULL},
	 { "ComplexVector___setitem__", _wrap_ComplexVector___setitem__, METH_VARARGS, NULL},
	 { "ComplexVector_pop", _wrap_ComplexVector_pop, METH_VARARGS, NULL},
	 { "ComplexVector_append", _wrap_ComplexVector_append, METH_VARARGS, NULL},
	 { "ComplexVector_empty", _wrap_ComplexVector_empty, METH_VARARGS, NULL},
	 { "ComplexVector_size", _wrap_ComplexVector_size, METH_VARARGS, NULL},
	 { "ComplexVector_swap", _wrap_ComplexVector_swap, METH_VARARGS, NULL},
	 { "ComplexVector_begin", _wrap_ComplexVector_begin, METH_VARARGS, NULL},
	 { "ComplexVector_end", _wrap_ComplexVector_end, METH_VARARGS, NULL},
	 { "ComplexVector_rbegin", _wrap_ComplexVector_rbegin, METH_VARARGS, NULL},
	 { "ComplexVector_rend", _wrap_ComplexVector_rend, METH_VARARGS, NULL},
	 { "ComplexVector_clear", _wrap_ComplexVector_clear, METH_VARARGS, NULL},
	 { "ComplexVector_get_allocator", _wrap_ComplexVector_get_allocator, METH_VARARGS, NULL},
	 { "ComplexVector_pop_back", _wrap_ComplexVector_pop_back, METH_VARARGS, NULL},
	 { "ComplexVector_erase", _wrap_ComplexVector_erase, METH_VARARGS, NULL},
	 { "new_ComplexVector", _wrap_new_ComplexVector, METH_VARARGS, NULL},
	 { "ComplexVector_push_back", _wrap_ComplexVector_push_back, METH_VARARGS, NULL},
	 { "ComplexVector_front", _wrap_ComplexVector_front, METH_VARARGS, NULL},
	 { "ComplexVector_back", _wrap_ComplexVector_back, METH_VARARGS, NULL},
	 { "ComplexVector_assign", _wrap_ComplexVector_assign, METH_VARARGS, NULL},
	 { "ComplexVector_resize", _wrap_ComplexVector_resize, METH_VARARGS, NULL},
	 { "ComplexVector_insert", _wrap_ComplexVector_insert, METH_VARARGS, NULL},
	 { "ComplexVector_reserve", _wrap_ComplexVector_reserve, METH_VARARGS, NULL},
	 { "ComplexVector_capacity", _wrap_ComplexVector_capacity, METH_VARARGS, NULL},
	 { "delete_ComplexVector", _wrap_delete_ComplexVector, METH_VARARGS, NULL},
	 { "ComplexVector_swigregister", ComplexVector_swigregister, METH_O, NULL},
	 { "ComplexVector_swiginit", ComplexVector_swiginit, METH_VARARGS, NULL},
	 { "vector3_x_set", _wrap_vector3_x_set, METH_VARARGS, NULL},
	 { "vector3_x_get", _wrap_vector3_x_get, METH_VARARGS, NULL},
	 { "vector3_y_set", _wrap_vector3_y_set, METH_VARARGS, NULL},
	 { "vector3_y_get", _wrap_vector3_y_get, METH_VARARGS, NULL},
	 { "vector3_z_set", _wrap_vector3_z_set, METH_VARARGS, NULL},
	 { "vector3_z_get", _wrap_vector3_z_get, METH_VARARGS, NULL},
	 { "new_vector3", _wrap_new_vector3, METH_VARARGS, NULL},
	 { "delete_vector3", _wrap_delete_vector3, METH_VARARGS, NULL},
	 { "vector3_swigregister", vector3_swigregister, METH_O, NULL},
	 { "vector3_swiginit", vector3_swiginit, METH_VARARGS, NULL},
	 { "geom_box_low_set", _wrap_geom_box_low_set, METH_VARARGS, NULL},
	 { "geom_box_low_get", _wrap_geom_box_low_get, METH_VARARGS, NULL},
	 { "geom_box_high_set", _wrap_geom_box_high_set, METH_VARARGS, NULL},
	 { "geom_box_high_get", _wrap_geom_box_high_get, METH_VARARGS, NULL},
	 { "new_geom_box", _wrap_new_geom_box, METH_VARARGS, NULL},
	 { "delete_geom_box", _wrap_delete_geom_box, METH_VARARGS, NULL},
	 { "geom_box_swigregister", geom_box_swigregister, METH_O, NULL},
	 { "geom_box_swiginit", geom_box_swiginit, METH_VARARGS, NULL},
	 { "eigenmode_data_mdata_set", _wrap_eigenmode_data_mdata_set, METH_VARARGS, NULL},
	 { "eigenmode_data_mdata_get", _wrap_eigenmode_data_mdata_get, METH_VARARGS, NULL},
	 { "eigenmode_data_fft_data_H_set", _wrap_eigenmode_data_fft_data_H_set, METH_VARARGS, NULL},
	 { "eigenmode_data_fft_data_H_get", _wrap_eigenmode_data_fft_data_H_get, METH_VARARGS, NULL},
	 { "eigenmode_data_fft_data_E_set", _wrap_eigenmode_data_fft_data_E_set, METH_VARARGS, NULL},
	 { "eigenmode_data_fft_data_E_get", _wrap_eigenmode_data_fft_data_E_get, METH_VARARGS, NULL},
	 { "eigenmode_data_H_set", _wrap_eigenmode_data_H_set, METH_VARARGS, NULL},
	 { "eigenmode_data_H_get", _wrap_eigenmode_data_H_get, METH_VARARGS, NULL},
	 { "eigenmode_data_n_set", _wrap_eigenmode_data_n_set, METH_VARARGS, NULL},
	 { "eigenmode_data_n_get", _wrap_eigenmode_data_n_get, METH_VARARGS, NULL},
	 { "eigenmode_data_s_set", _wrap_eigenmode_data_s_set, METH_VARARGS, NULL},
	 { "eigenmode_data_s_get", _wrap_eigenmode_data_s_get, METH_VARARGS, NULL},
	 { "eigenmode_data_Gk_set", _wrap_eigenmode_data_Gk_set, METH_VARARGS, NULL},
	 { "eigenmode_data_Gk_get", _wrap_eigenmode_data_Gk_get, METH_VARARGS, NULL},
	 { "eigenmode_data_center_set", _wrap_eigenmode_data_center_set, METH_VARARGS, NULL},
	 { "eigenmode_data_center_get", _wrap_eigenmode_data_center_get, METH_VARARGS, NULL},
	 { "eigenmode_data_amp_func_set", _wrap_eigenmode_data_amp_func_set, METH_VARARGS, NULL},
	 { "eigenmode_data_amp_func_get", _wrap_eigenmode_data_amp_func_get, METH_VARARGS, NULL},
	 { "eigenmode_data_band_num_set", _wrap_eigenmode_data_band_num_set, METH_VARARGS, NULL},
	 { "eigenmode_data_band_num_get", _wrap_eigenmode_data_band_num_get, METH_VARARGS, NULL},
	 { "eigenmode_data_frequency_set", _wrap_eigenmode_data_frequency_set, METH_VARARGS, NULL},
	 { "eigenmode_data_frequency_get", _wrap_eigenmode_data_frequency_get, METH_VARARGS, NULL},
	 { "eigenmode_data_group_velocity_set", _wrap_eigenmode_data_group_velocity_set, METH_VARARGS, NULL},
	 { "eigenmode_data_group_velocity_get", _wrap_eigenmode_data_group_velocity_get, METH_VARARGS, NULL},
	 { "delete_eigenmode_data", _wrap_delete_eigenmode_data, METH_VARARGS, NULL},
	 { "new_eigenmode_data", _wrap_new_eigenmode_data, METH_VARARGS, NULL},
	 { "eigenmode_data_swigregister", eigenmode_data_swigregister, METH_O, NULL},
	 { "eigenmode_data_swiginit", eigenmode_data_swiginit, METH_VARARGS, NULL},
	 { "_get_eigenmode", _wrap__get_eigenmode, METH_VARARGS, NULL},
	 { "_get_eigenmode_Gk", _wrap__get_eigenmode_Gk, METH_VARARGS, NULL},
	 { "is_point_in_object", _wrap_is_point_in_object, METH_VARARGS, NULL},
	 { "is_point_in_periodic_object", _wrap_is_point_in_periodic_object, METH_VARARGS, NULL},
	 { "display_geometric_object_info", _wrap_display_geometric_object_info, METH_VARARGS, NULL},
	 { "get_eigenmode_coefficients_and_kpoints", _wrap_get_eigenmode_coefficients_and_kpoints, METH_VARARGS, NULL},
	 { "_get_array_slice_dimensions", _wrap__get_array_slice_dimensions, METH_VARARGS, NULL},
	 { "get_realnum_size", _wrap_get_realnum_size, METH_VARARGS, NULL},
	 { "is_single_precision", _wrap_is_single_precision, METH_VARARGS, NULL},
	 { "create_structure", _wrap_create_structure, METH_VARARGS, NULL},
	 { "_set_materials", _wrap__set_materials, METH_VARARGS, NULL},
	 { "_get_epsilon_grid", _wrap__get_epsilon_grid, METH_VARARGS, NULL},
	 { NULL, NULL, 0, NULL }
};

static PyMethodDef SwigMethods_proxydocs[] = {
	 { NULL, NULL, 0, NULL }
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */

static void *_p_p_meep__lorentzian_susceptibilityTo_p_p_meep__susceptibility(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((meep::susceptibility **)  ((meep::lorentzian_susceptibility **) x));
}
static void *_p_p_meep__noisy_lorentzian_susceptibilityTo_p_p_meep__susceptibility(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((meep::susceptibility **) (meep::lorentzian_susceptibility *) ((meep::noisy_lorentzian_susceptibility **) x));
}
static void *_p_p_meep__gyrotropic_susceptibilityTo_p_p_meep__susceptibility(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((meep::susceptibility **)  ((meep::gyrotropic_susceptibility **) x));
}
static void *_p_p_meep__multilevel_susceptibilityTo_p_p_meep__susceptibility(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((meep::susceptibility **)  ((meep::multilevel_susceptibility **) x));
}
static void *_p_meep__lorentzian_susceptibilityTo_p_meep__susceptibility(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((meep::susceptibility *)  ((meep::lorentzian_susceptibility *) x));
}
static void *_p_meep__noisy_lorentzian_susceptibilityTo_p_meep__susceptibility(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((meep::susceptibility *) (meep::lorentzian_susceptibility *) ((meep::noisy_lorentzian_susceptibility *) x));
}
static void *_p_meep__gyrotropic_susceptibilityTo_p_meep__susceptibility(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((meep::susceptibility *)  ((meep::gyrotropic_susceptibility *) x));
}
static void *_p_meep__multilevel_susceptibilityTo_p_meep__susceptibility(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((meep::susceptibility *)  ((meep::multilevel_susceptibility *) x));
}
static void *_p_meep__noisy_lorentzian_susceptibilityTo_p_meep__lorentzian_susceptibility(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((meep::lorentzian_susceptibility *)  ((meep::noisy_lorentzian_susceptibility *) x));
}
static void *_p_meep__simple_material_functionTo_p_meep__material_function(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((meep::material_function *)  ((meep::simple_material_function *) x));
}
static void *_p_meep_geom__geom_epsilonTo_p_meep__material_function(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((meep::material_function *)  ((meep_geom::geom_epsilon *) x));
}
static void *_p_p_meep__gaussian_src_timeTo_p_p_meep__src_time(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((meep::src_time **)  ((meep::gaussian_src_time **) x));
}
static void *_p_p_meep__continuous_src_timeTo_p_p_meep__src_time(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((meep::src_time **)  ((meep::continuous_src_time **) x));
}
static void *_p_p_meep__custom_src_timeTo_p_p_meep__src_time(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((meep::src_time **)  ((meep::custom_src_time **) x));
}
static void *_p_p_meep__custom_py_src_timeTo_p_p_meep__src_time(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((meep::src_time **)  ((meep::custom_py_src_time **) x));
}
static void *_p_meep__gaussian_src_timeTo_p_meep__src_time(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((meep::src_time *)  ((meep::gaussian_src_time *) x));
}
static void *_p_meep__continuous_src_timeTo_p_meep__src_time(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((meep::src_time *)  ((meep::continuous_src_time *) x));
}
static void *_p_meep__custom_src_timeTo_p_meep__src_time(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((meep::src_time *)  ((meep::custom_src_time *) x));
}
static void *_p_meep__custom_py_src_timeTo_p_meep__src_time(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((meep::src_time *)  ((meep::custom_py_src_time *) x));
}
static swig_type_info _swigt__p_FILE = {"_p_FILE", "FILE *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GEOMETRIC_OBJECT = {"_p_GEOMETRIC_OBJECT", "GEOMETRIC_OBJECT *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_a_2__meep_geom__cond_profile = {"_p_a_2__meep_geom__cond_profile", "meep_geom::cond_profile (*)[2]", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_a_2__p_double = {"_p_a_2__p_double", "double *(*)[2]|meep::realnum *(*)[2]", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_a_5__bool = {"_p_a_5__bool", "bool (*)[5]", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_a_5__meep__boundary_condition = {"_p_a_5__meep__boundary_condition", "enum meep::boundary_condition (*)[5]|meep::boundary_condition (*)[5]", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_a_5__p_double = {"_p_a_5__p_double", "double *(*)[5]|meep::realnum *(*)[5]", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_a_9__std__complexT_double_t = {"_p_a_9__std__complexT_double_t", "std::complex< double > (*)[9]", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_access_mode = {"_p_access_mode", "access_mode *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_allocator_type = {"_p_allocator_type", "allocator_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_amplitude_function = {"_p_amplitude_function", "amplitude_function *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_bool = {"_p_bool", "bool *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_boundary_region_kind = {"_p_boundary_region_kind", "boundary_region_kind *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_difference_type = {"_p_difference_type", "difference_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_double = {"_p_double", "meep::realnum *|double *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_evectmatrix = {"_p_evectmatrix", "evectmatrix *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_double_int_p_void__meep__vec = {"_p_f_double_int_p_void__meep__vec", "meep::kpoint_func|meep::vec (*)(double,int,void *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_double_p_void__double = {"_p_f_double_p_void__double", "double (*)(double,void *)|meep::pml_profile_func", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_double_p_void__std__complexT_double_t = {"_p_f_double_p_void__std__complexT_double_t", "std::complex< double > (*)(double,void *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_int_p_double_p_void__double = {"_p_f_int_p_double_p_void__double", "double (*)(int,double *,void *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void = {"_p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void", "void (*)(meep::fields_chunk *,int,enum meep::component,meep::ivec,meep::ivec,meep::vec,meep::vec,meep::vec,meep::vec,double,double,meep::ivec,std::complex< double >,meep::symmetry const &,int,void *)|meep::field_chunkloop", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_q_const__char__void = {"_p_f_p_q_const__char__void", "void (*)(char const *)|meep::meep_printf_callback_func", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double = {"_p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double", "double (*)(std::complex< double > const *,meep::vec const &,void *)|meep::field_rfunction", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_q_const__std__complex__meep__realnum___r_q_const__meep__vec_p_void__std__complexT_double_t = {"_p_f_p_q_const__std__complex__meep__realnum___r_q_const__meep__vec_p_void__std__complexT_double_t", "std::complex< double > (*)(std::complex< meep::realnum > const *,meep::vec const &,void *)|meep::field_function", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_std__complex__double____std__complexT_double_t = {"_p_f_std__complex__double____std__complexT_double_t", "std::complex< double > (*)(std::complex< double >)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_float = {"_p_float", "float *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_geom_box = {"_p_geom_box", "geom_box *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_geom_box_tree = {"_p_geom_box_tree", "geom_box_tree *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_geometric_object = {"_p_geometric_object", "geometric_object *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_geometric_object_list = {"_p_geometric_object_list", "geometric_object_list *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_long_double = {"_p_long_double", "long double *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_material_data = {"_p_material_data", "material_data *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_material_type = {"_p_material_type", "material_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_material_type_list = {"_p_material_type_list", "material_type_list *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_maxwell_data = {"_p_maxwell_data", "maxwell_data *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__binary_partition = {"_p_meep__binary_partition", "meep::binary_partition *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__boundary_region = {"_p_meep__boundary_region", "meep::boundary_region *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__chunkloop_field_components = {"_p_meep__chunkloop_field_components", "meep::chunkloop_field_components *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__comms_key = {"_p_meep__comms_key", "meep::comms_key *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__component = {"_p_meep__component", "enum meep::component *|meep::component *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__continuous_src_time = {"_p_meep__continuous_src_time", "meep::continuous_src_time *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__custom_py_src_time = {"_p_meep__custom_py_src_time", "meep::custom_py_src_time *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__custom_src_time = {"_p_meep__custom_src_time", "meep::custom_src_time *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__dft_chunk = {"_p_meep__dft_chunk", "meep::dft_chunk *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__dft_energy = {"_p_meep__dft_energy", "meep::dft_energy *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__dft_fields = {"_p_meep__dft_fields", "meep::dft_fields *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__dft_flux = {"_p_meep__dft_flux", "meep::dft_flux *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__dft_force = {"_p_meep__dft_force", "meep::dft_force *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__dft_ldos = {"_p_meep__dft_ldos", "meep::dft_ldos *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__dft_near2far = {"_p_meep__dft_near2far", "meep::dft_near2far *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__diffractedplanewave = {"_p_meep__diffractedplanewave", "meep::diffractedplanewave *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__direction = {"_p_meep__direction", "enum meep::direction *|meep::direction *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__eigenmode_data = {"_p_meep__eigenmode_data", "meep::eigenmode_data *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__fields = {"_p_meep__fields", "meep::fields *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__fields_chunk = {"_p_meep__fields_chunk", "meep::fields_chunk *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__flux_vol = {"_p_meep__flux_vol", "meep::flux_vol *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__gaussian_src_time = {"_p_meep__gaussian_src_time", "meep::gaussian_src_time *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__gaussianbeam = {"_p_meep__gaussianbeam", "meep::gaussianbeam *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__grid_volume = {"_p_meep__grid_volume", "meep::grid_volume *|std::vector< meep::grid_volume >::value_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__gyrotropic_susceptibility = {"_p_meep__gyrotropic_susceptibility", "meep::gyrotropic_susceptibility *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__gyrotropy_model = {"_p_meep__gyrotropy_model", "enum meep::gyrotropy_model *|meep::gyrotropy_model *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__h5file = {"_p_meep__h5file", "meep::h5file *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__h5file__extending_s = {"_p_meep__h5file__extending_s", "meep::h5file::extending_s *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__initialize = {"_p_meep__initialize", "meep::initialize *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__ivec = {"_p_meep__ivec", "meep::ivec *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__lorentzian_susceptibility = {"_p_meep__lorentzian_susceptibility", "meep::lorentzian_susceptibility *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__material_function = {"_p_meep__material_function", "meep::material_function *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__monitor_point = {"_p_meep__monitor_point", "meep::monitor_point *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__multilevel_susceptibility = {"_p_meep__multilevel_susceptibility", "meep::multilevel_susceptibility *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__noisy_lorentzian_susceptibility = {"_p_meep__noisy_lorentzian_susceptibility", "meep::noisy_lorentzian_susceptibility *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__polarization_state_s = {"_p_meep__polarization_state_s", "meep::polarization_state_s *|meep::polarization_state *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__signed_direction = {"_p_meep__signed_direction", "meep::signed_direction *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__simple_material_function = {"_p_meep__simple_material_function", "meep::simple_material_function *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__sourcedata = {"_p_meep__sourcedata", "std::vector< meep::sourcedata >::value_type *|meep::sourcedata *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__split_plane = {"_p_meep__split_plane", "meep::split_plane *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__src_time = {"_p_meep__src_time", "meep::src_time *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__structure = {"_p_meep__structure", "meep::structure *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__structure_chunk = {"_p_meep__structure_chunk", "meep::structure_chunk *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__susceptibility = {"_p_meep__susceptibility", "meep::susceptibility *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__symmetry = {"_p_meep__symmetry", "meep::symmetry *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__vec = {"_p_meep__vec", "meep::vec *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__volume = {"_p_meep__volume", "meep::volume *|std::vector< meep::volume >::value_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep__volume_list = {"_p_meep__volume_list", "meep::volume_list *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep_geom__absorber = {"_p_meep_geom__absorber", "meep_geom::absorber *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep_geom__cond_profile = {"_p_meep_geom__cond_profile", "meep_geom::cond_profile *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep_geom__dft_data = {"_p_meep_geom__dft_data", "std::vector< meep_geom::dft_data >::value_type *|meep_geom::dft_data *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep_geom__fragment_stats = {"_p_meep_geom__fragment_stats", "std::vector< meep_geom::fragment_stats >::value_type *|meep_geom::fragment_stats *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep_geom__geom_epsilon = {"_p_meep_geom__geom_epsilon", "meep_geom::geom_epsilon *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep_geom__pol = {"_p_meep_geom__pol", "meep_geom::pol *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep_geom__susceptibility = {"_p_meep_geom__susceptibility", "meep_geom::susceptibility *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_meep_geom__symm_matrix = {"_p_meep_geom__symm_matrix", "meep_geom::symm_matrix *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_PyObject = {"_p_p_PyObject", "PyObject **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_double = {"_p_p_double", "meep::realnum **|double **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_meep__dft_chunk = {"_p_p_meep__dft_chunk", "meep::dft_chunk **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_meep__fields_chunk = {"_p_p_meep__fields_chunk", "meep::fields_chunk **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_meep__src_time = {"_p_p_meep__src_time", "meep::src_time **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_meep__gaussian_src_time = {"_p_p_meep__gaussian_src_time", 0, 0, 0, 0, 0};
static swig_type_info _swigt__p_p_meep__continuous_src_time = {"_p_p_meep__continuous_src_time", 0, 0, 0, 0, 0};
static swig_type_info _swigt__p_p_meep__custom_src_time = {"_p_p_meep__custom_src_time", 0, 0, 0, 0, 0};
static swig_type_info _swigt__p_p_meep__custom_py_src_time = {"_p_p_meep__custom_py_src_time", 0, 0, 0, 0, 0};
static swig_type_info _swigt__p_p_meep__structure_chunk = {"_p_p_meep__structure_chunk", "meep::structure_chunk **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_meep__susceptibility = {"_p_p_meep__susceptibility", "meep::susceptibility **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_meep__lorentzian_susceptibility = {"_p_p_meep__lorentzian_susceptibility", 0, 0, 0, 0, 0};
static swig_type_info _swigt__p_p_meep__noisy_lorentzian_susceptibility = {"_p_p_meep__noisy_lorentzian_susceptibility", 0, 0, 0, 0, 0};
static swig_type_info _swigt__p_p_meep__gyrotropic_susceptibility = {"_p_p_meep__gyrotropic_susceptibility", 0, 0, 0, 0, 0};
static swig_type_info _swigt__p_p_meep__multilevel_susceptibility = {"_p_p_meep__multilevel_susceptibility", 0, 0, 0, 0, 0};
static swig_type_info _swigt__p_p_p_char = {"_p_p_p_char", "char ***", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_std__complexT_double_t = {"_p_p_std__complexT_double_t", "std::complex< meep::realnum > **|std::complex< double > **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_void = {"_p_p_void", "void **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_ptrdiff_t = {"_p_ptrdiff_t", "ptrdiff_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_scalar_complex = {"_p_scalar_complex", "scalar_complex *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__allocatorT_double_t = {"_p_std__allocatorT_double_t", "std::vector< double >::allocator_type *|std::allocator< double > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__allocatorT_int_t = {"_p_std__allocatorT_int_t", "std::vector< int >::allocator_type *|std::allocator< int > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__allocatorT_meep__grid_volume_t = {"_p_std__allocatorT_meep__grid_volume_t", "std::allocator< meep::grid_volume > *|std::vector< meep::grid_volume >::allocator_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__allocatorT_meep__sourcedata_t = {"_p_std__allocatorT_meep__sourcedata_t", "std::vector< meep::sourcedata >::allocator_type *|std::allocator< meep::sourcedata > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__allocatorT_meep__volume_t = {"_p_std__allocatorT_meep__volume_t", "std::allocator< meep::volume > *|std::vector< meep::volume >::allocator_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__allocatorT_meep_geom__dft_data_t = {"_p_std__allocatorT_meep_geom__dft_data_t", "std::vector< meep_geom::dft_data >::allocator_type *|std::allocator< meep_geom::dft_data > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__allocatorT_meep_geom__fragment_stats_t = {"_p_std__allocatorT_meep_geom__fragment_stats_t", "std::allocator< meep_geom::fragment_stats > *|std::vector< meep_geom::fragment_stats >::allocator_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__allocatorT_size_t_t = {"_p_std__allocatorT_size_t_t", "std::vector< size_t >::allocator_type *|std::allocator< size_t > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__allocatorT_std__complexT_double_t_t = {"_p_std__allocatorT_std__complexT_double_t_t", "std::allocator< std::complex< double > > *|std::vector< std::complex< double > >::allocator_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__complexT_double_t = {"_p_std__complexT_double_t", "std::complex< meep::realnum > *|std::complex< double > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__complexT_float_t = {"_p_std__complexT_float_t", "std::complex< float > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__complexT_long_double_t = {"_p_std__complexT_long_double_t", "std::complex< long double > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__pairT_int_int_t = {"_p_std__pairT_int_int_t", "std::pair< int,int > *|meep::chunk_pair *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__unique_ptrT_meep__binary_partition_t = {"_p_std__unique_ptrT_meep__binary_partition_t", "std::unique_ptr< meep::binary_partition > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__unordered_mapT_meep__time_sink_double_std__hashT_int_t_t = {"_p_std__unordered_mapT_meep__time_sink_double_std__hashT_int_t_t", "meep::time_sink_to_duration_map *|std::unordered_map< enum meep::time_sink,double,std::hash< int > > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_double_std__allocatorT_double_t_t = {"_p_std__vectorT_double_std__allocatorT_double_t_t", "std::vector< double,std::allocator< double > > *|std::vector< double > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_int_std__allocatorT_int_t_t = {"_p_std__vectorT_int_std__allocatorT_int_t_t", "std::vector< int,std::allocator< int > > *|std::vector< int > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t = {"_p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t", "std::vector< meep::component,std::allocator< meep::component > > *|std::vector< enum meep::component,std::allocator< enum meep::component > > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_meep__dft_fields_p_std__allocatorT_meep__dft_fields_p_t_t = {"_p_std__vectorT_meep__dft_fields_p_std__allocatorT_meep__dft_fields_p_t_t", "std::vector< meep::dft_fields *,std::allocator< meep::dft_fields * > > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t = {"_p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t", "std::vector< meep::grid_volume > *|std::vector< meep::grid_volume,std::allocator< meep::grid_volume > > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t = {"_p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t", "std::vector< meep::sourcedata,std::allocator< meep::sourcedata > > *|std::vector< meep::sourcedata > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t = {"_p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t", "std::vector< meep::volume > *|std::vector< meep::volume,std::allocator< meep::volume > > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_meep_geom__absorber_std__allocatorT_meep_geom__absorber_t_t = {"_p_std__vectorT_meep_geom__absorber_std__allocatorT_meep_geom__absorber_t_t", "meep_geom::absorber_list_type *|meep_geom::absorber_list|std::vector< meep_geom::absorber,std::allocator< meep_geom::absorber > > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t = {"_p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t", "std::vector< meep_geom::dft_data,std::allocator< meep_geom::dft_data > > *|std::vector< meep_geom::dft_data > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t = {"_p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t", "std::vector< meep_geom::fragment_stats > *|std::vector< meep_geom::fragment_stats,std::allocator< meep_geom::fragment_stats > > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_ptrdiff_t_std__allocatorT_ptrdiff_t_t_t = {"_p_std__vectorT_ptrdiff_t_std__allocatorT_ptrdiff_t_t_t", "std::vector< ptrdiff_t,std::allocator< ptrdiff_t > > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_size_t_std__allocatorT_size_t_t_t = {"_p_std__vectorT_size_t_std__allocatorT_size_t_t_t", "std::vector< size_t,std::allocator< size_t > > *|std::vector< size_t > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t = {"_p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t", "std::vector< std::complex< double > > *|std::vector< std::complex< double >,std::allocator< std::complex< double > > > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_swig__SwigPyIterator = {"_p_swig__SwigPyIterator", "swig::SwigPyIterator *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_user_material_func = {"_p_user_material_func", "user_material_func *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_value_type = {"_p_value_type", "value_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_vector3 = {"_p_vector3", "vector3 *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};

static swig_type_info *swig_type_initial[] = {
  &_swigt__p_FILE,
  &_swigt__p_GEOMETRIC_OBJECT,
  &_swigt__p_a_2__meep_geom__cond_profile,
  &_swigt__p_a_2__p_double,
  &_swigt__p_a_5__bool,
  &_swigt__p_a_5__meep__boundary_condition,
  &_swigt__p_a_5__p_double,
  &_swigt__p_a_9__std__complexT_double_t,
  &_swigt__p_access_mode,
  &_swigt__p_allocator_type,
  &_swigt__p_amplitude_function,
  &_swigt__p_bool,
  &_swigt__p_boundary_region_kind,
  &_swigt__p_char,
  &_swigt__p_difference_type,
  &_swigt__p_double,
  &_swigt__p_evectmatrix,
  &_swigt__p_f_double_int_p_void__meep__vec,
  &_swigt__p_f_double_p_void__double,
  &_swigt__p_f_double_p_void__std__complexT_double_t,
  &_swigt__p_f_int_p_double_p_void__double,
  &_swigt__p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void,
  &_swigt__p_f_p_q_const__char__void,
  &_swigt__p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double,
  &_swigt__p_f_p_q_const__std__complex__meep__realnum___r_q_const__meep__vec_p_void__std__complexT_double_t,
  &_swigt__p_f_std__complex__double____std__complexT_double_t,
  &_swigt__p_float,
  &_swigt__p_geom_box,
  &_swigt__p_geom_box_tree,
  &_swigt__p_geometric_object,
  &_swigt__p_geometric_object_list,
  &_swigt__p_int,
  &_swigt__p_long_double,
  &_swigt__p_material_data,
  &_swigt__p_material_type,
  &_swigt__p_material_type_list,
  &_swigt__p_maxwell_data,
  &_swigt__p_meep__binary_partition,
  &_swigt__p_meep__boundary_region,
  &_swigt__p_meep__chunkloop_field_components,
  &_swigt__p_meep__comms_key,
  &_swigt__p_meep__component,
  &_swigt__p_meep__continuous_src_time,
  &_swigt__p_meep__custom_py_src_time,
  &_swigt__p_meep__custom_src_time,
  &_swigt__p_meep__dft_chunk,
  &_swigt__p_meep__dft_energy,
  &_swigt__p_meep__dft_fields,
  &_swigt__p_meep__dft_flux,
  &_swigt__p_meep__dft_force,
  &_swigt__p_meep__dft_ldos,
  &_swigt__p_meep__dft_near2far,
  &_swigt__p_meep__diffractedplanewave,
  &_swigt__p_meep__direction,
  &_swigt__p_meep__eigenmode_data,
  &_swigt__p_meep__fields,
  &_swigt__p_meep__fields_chunk,
  &_swigt__p_meep__flux_vol,
  &_swigt__p_meep__gaussian_src_time,
  &_swigt__p_meep__gaussianbeam,
  &_swigt__p_meep__grid_volume,
  &_swigt__p_meep__gyrotropic_susceptibility,
  &_swigt__p_meep__gyrotropy_model,
  &_swigt__p_meep__h5file,
  &_swigt__p_meep__h5file__extending_s,
  &_swigt__p_meep__initialize,
  &_swigt__p_meep__ivec,
  &_swigt__p_meep__lorentzian_susceptibility,
  &_swigt__p_meep__material_function,
  &_swigt__p_meep__monitor_point,
  &_swigt__p_meep__multilevel_susceptibility,
  &_swigt__p_meep__noisy_lorentzian_susceptibility,
  &_swigt__p_meep__polarization_state_s,
  &_swigt__p_meep__signed_direction,
  &_swigt__p_meep__simple_material_function,
  &_swigt__p_meep__sourcedata,
  &_swigt__p_meep__split_plane,
  &_swigt__p_meep__src_time,
  &_swigt__p_meep__structure,
  &_swigt__p_meep__structure_chunk,
  &_swigt__p_meep__susceptibility,
  &_swigt__p_meep__symmetry,
  &_swigt__p_meep__vec,
  &_swigt__p_meep__volume,
  &_swigt__p_meep__volume_list,
  &_swigt__p_meep_geom__absorber,
  &_swigt__p_meep_geom__cond_profile,
  &_swigt__p_meep_geom__dft_data,
  &_swigt__p_meep_geom__fragment_stats,
  &_swigt__p_meep_geom__geom_epsilon,
  &_swigt__p_meep_geom__pol,
  &_swigt__p_meep_geom__susceptibility,
  &_swigt__p_meep_geom__symm_matrix,
  &_swigt__p_p_PyObject,
  &_swigt__p_p_double,
  &_swigt__p_p_meep__continuous_src_time,
  &_swigt__p_p_meep__custom_py_src_time,
  &_swigt__p_p_meep__custom_src_time,
  &_swigt__p_p_meep__dft_chunk,
  &_swigt__p_p_meep__fields_chunk,
  &_swigt__p_p_meep__gaussian_src_time,
  &_swigt__p_p_meep__gyrotropic_susceptibility,
  &_swigt__p_p_meep__lorentzian_susceptibility,
  &_swigt__p_p_meep__multilevel_susceptibility,
  &_swigt__p_p_meep__noisy_lorentzian_susceptibility,
  &_swigt__p_p_meep__src_time,
  &_swigt__p_p_meep__structure_chunk,
  &_swigt__p_p_meep__susceptibility,
  &_swigt__p_p_p_char,
  &_swigt__p_p_std__complexT_double_t,
  &_swigt__p_p_void,
  &_swigt__p_ptrdiff_t,
  &_swigt__p_scalar_complex,
  &_swigt__p_size_t,
  &_swigt__p_size_type,
  &_swigt__p_std__allocatorT_double_t,
  &_swigt__p_std__allocatorT_int_t,
  &_swigt__p_std__allocatorT_meep__grid_volume_t,
  &_swigt__p_std__allocatorT_meep__sourcedata_t,
  &_swigt__p_std__allocatorT_meep__volume_t,
  &_swigt__p_std__allocatorT_meep_geom__dft_data_t,
  &_swigt__p_std__allocatorT_meep_geom__fragment_stats_t,
  &_swigt__p_std__allocatorT_size_t_t,
  &_swigt__p_std__allocatorT_std__complexT_double_t_t,
  &_swigt__p_std__complexT_double_t,
  &_swigt__p_std__complexT_float_t,
  &_swigt__p_std__complexT_long_double_t,
  &_swigt__p_std__invalid_argument,
  &_swigt__p_std__pairT_int_int_t,
  &_swigt__p_std__unique_ptrT_meep__binary_partition_t,
  &_swigt__p_std__unordered_mapT_meep__time_sink_double_std__hashT_int_t_t,
  &_swigt__p_std__vectorT_double_std__allocatorT_double_t_t,
  &_swigt__p_std__vectorT_int_std__allocatorT_int_t_t,
  &_swigt__p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t,
  &_swigt__p_std__vectorT_meep__dft_fields_p_std__allocatorT_meep__dft_fields_p_t_t,
  &_swigt__p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t,
  &_swigt__p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t,
  &_swigt__p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t,
  &_swigt__p_std__vectorT_meep_geom__absorber_std__allocatorT_meep_geom__absorber_t_t,
  &_swigt__p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t,
  &_swigt__p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t,
  &_swigt__p_std__vectorT_ptrdiff_t_std__allocatorT_ptrdiff_t_t_t,
  &_swigt__p_std__vectorT_size_t_std__allocatorT_size_t_t_t,
  &_swigt__p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t,
  &_swigt__p_swig__SwigPyIterator,
  &_swigt__p_user_material_func,
  &_swigt__p_value_type,
  &_swigt__p_vector3,
  &_swigt__p_void,
};

static swig_cast_info _swigc__p_FILE[] = {  {&_swigt__p_FILE, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GEOMETRIC_OBJECT[] = {  {&_swigt__p_GEOMETRIC_OBJECT, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_a_2__meep_geom__cond_profile[] = {  {&_swigt__p_a_2__meep_geom__cond_profile, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_a_2__p_double[] = {  {&_swigt__p_a_2__p_double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_a_5__bool[] = {  {&_swigt__p_a_5__bool, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_a_5__meep__boundary_condition[] = {  {&_swigt__p_a_5__meep__boundary_condition, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_a_5__p_double[] = {  {&_swigt__p_a_5__p_double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_a_9__std__complexT_double_t[] = {  {&_swigt__p_a_9__std__complexT_double_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_access_mode[] = {  {&_swigt__p_access_mode, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_allocator_type[] = {  {&_swigt__p_allocator_type, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_amplitude_function[] = {  {&_swigt__p_amplitude_function, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_bool[] = {  {&_swigt__p_bool, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_boundary_region_kind[] = {  {&_swigt__p_boundary_region_kind, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_difference_type[] = {  {&_swigt__p_difference_type, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_evectmatrix[] = {  {&_swigt__p_evectmatrix, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_double_int_p_void__meep__vec[] = {  {&_swigt__p_f_double_int_p_void__meep__vec, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_double_p_void__double[] = {  {&_swigt__p_f_double_p_void__double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_double_p_void__std__complexT_double_t[] = {  {&_swigt__p_f_double_p_void__std__complexT_double_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_int_p_double_p_void__double[] = {  {&_swigt__p_f_int_p_double_p_void__double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void[] = {  {&_swigt__p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_q_const__char__void[] = {  {&_swigt__p_f_p_q_const__char__void, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double[] = {  {&_swigt__p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_q_const__std__complex__meep__realnum___r_q_const__meep__vec_p_void__std__complexT_double_t[] = {  {&_swigt__p_f_p_q_const__std__complex__meep__realnum___r_q_const__meep__vec_p_void__std__complexT_double_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_std__complex__double____std__complexT_double_t[] = {  {&_swigt__p_f_std__complex__double____std__complexT_double_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_float[] = {  {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_geom_box[] = {  {&_swigt__p_geom_box, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_geom_box_tree[] = {  {&_swigt__p_geom_box_tree, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_geometric_object[] = {  {&_swigt__p_geometric_object, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_geometric_object_list[] = {  {&_swigt__p_geometric_object_list, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_long_double[] = {  {&_swigt__p_long_double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_material_data[] = {  {&_swigt__p_material_data, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_material_type[] = {  {&_swigt__p_material_type, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_material_type_list[] = {  {&_swigt__p_material_type_list, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_maxwell_data[] = {  {&_swigt__p_maxwell_data, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__binary_partition[] = {  {&_swigt__p_meep__binary_partition, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__boundary_region[] = {  {&_swigt__p_meep__boundary_region, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__chunkloop_field_components[] = {  {&_swigt__p_meep__chunkloop_field_components, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__comms_key[] = {  {&_swigt__p_meep__comms_key, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__component[] = {  {&_swigt__p_meep__component, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__continuous_src_time[] = {  {&_swigt__p_meep__continuous_src_time, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__custom_py_src_time[] = {  {&_swigt__p_meep__custom_py_src_time, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__custom_src_time[] = {  {&_swigt__p_meep__custom_src_time, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__dft_chunk[] = {  {&_swigt__p_meep__dft_chunk, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__dft_energy[] = {  {&_swigt__p_meep__dft_energy, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__dft_fields[] = {  {&_swigt__p_meep__dft_fields, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__dft_flux[] = {  {&_swigt__p_meep__dft_flux, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__dft_force[] = {  {&_swigt__p_meep__dft_force, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__dft_ldos[] = {  {&_swigt__p_meep__dft_ldos, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__dft_near2far[] = {  {&_swigt__p_meep__dft_near2far, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__diffractedplanewave[] = {  {&_swigt__p_meep__diffractedplanewave, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__direction[] = {  {&_swigt__p_meep__direction, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__eigenmode_data[] = {  {&_swigt__p_meep__eigenmode_data, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__fields[] = {  {&_swigt__p_meep__fields, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__fields_chunk[] = {  {&_swigt__p_meep__fields_chunk, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__flux_vol[] = {  {&_swigt__p_meep__flux_vol, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__gaussian_src_time[] = {  {&_swigt__p_meep__gaussian_src_time, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__gaussianbeam[] = {  {&_swigt__p_meep__gaussianbeam, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__grid_volume[] = {  {&_swigt__p_meep__grid_volume, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__gyrotropic_susceptibility[] = {  {&_swigt__p_meep__gyrotropic_susceptibility, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__gyrotropy_model[] = {  {&_swigt__p_meep__gyrotropy_model, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__h5file[] = {  {&_swigt__p_meep__h5file, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__h5file__extending_s[] = {  {&_swigt__p_meep__h5file__extending_s, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__initialize[] = {  {&_swigt__p_meep__initialize, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__ivec[] = {  {&_swigt__p_meep__ivec, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__lorentzian_susceptibility[] = {  {&_swigt__p_meep__lorentzian_susceptibility, 0, 0, 0},  {&_swigt__p_meep__noisy_lorentzian_susceptibility, _p_meep__noisy_lorentzian_susceptibilityTo_p_meep__lorentzian_susceptibility, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__material_function[] = {  {&_swigt__p_meep__material_function, 0, 0, 0},  {&_swigt__p_meep__simple_material_function, _p_meep__simple_material_functionTo_p_meep__material_function, 0, 0},  {&_swigt__p_meep_geom__geom_epsilon, _p_meep_geom__geom_epsilonTo_p_meep__material_function, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__monitor_point[] = {  {&_swigt__p_meep__monitor_point, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__multilevel_susceptibility[] = {  {&_swigt__p_meep__multilevel_susceptibility, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__noisy_lorentzian_susceptibility[] = {  {&_swigt__p_meep__noisy_lorentzian_susceptibility, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__polarization_state_s[] = {  {&_swigt__p_meep__polarization_state_s, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__signed_direction[] = {  {&_swigt__p_meep__signed_direction, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__simple_material_function[] = {  {&_swigt__p_meep__simple_material_function, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__sourcedata[] = {  {&_swigt__p_meep__sourcedata, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__split_plane[] = {  {&_swigt__p_meep__split_plane, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__src_time[] = {  {&_swigt__p_meep__src_time, 0, 0, 0},  {&_swigt__p_meep__gaussian_src_time, _p_meep__gaussian_src_timeTo_p_meep__src_time, 0, 0},  {&_swigt__p_meep__continuous_src_time, _p_meep__continuous_src_timeTo_p_meep__src_time, 0, 0},  {&_swigt__p_meep__custom_src_time, _p_meep__custom_src_timeTo_p_meep__src_time, 0, 0},  {&_swigt__p_meep__custom_py_src_time, _p_meep__custom_py_src_timeTo_p_meep__src_time, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__structure[] = {  {&_swigt__p_meep__structure, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__structure_chunk[] = {  {&_swigt__p_meep__structure_chunk, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__susceptibility[] = {  {&_swigt__p_meep__susceptibility, 0, 0, 0},  {&_swigt__p_meep__lorentzian_susceptibility, _p_meep__lorentzian_susceptibilityTo_p_meep__susceptibility, 0, 0},  {&_swigt__p_meep__noisy_lorentzian_susceptibility, _p_meep__noisy_lorentzian_susceptibilityTo_p_meep__susceptibility, 0, 0},  {&_swigt__p_meep__gyrotropic_susceptibility, _p_meep__gyrotropic_susceptibilityTo_p_meep__susceptibility, 0, 0},  {&_swigt__p_meep__multilevel_susceptibility, _p_meep__multilevel_susceptibilityTo_p_meep__susceptibility, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__symmetry[] = {  {&_swigt__p_meep__symmetry, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__vec[] = {  {&_swigt__p_meep__vec, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__volume[] = {  {&_swigt__p_meep__volume, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep__volume_list[] = {  {&_swigt__p_meep__volume_list, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep_geom__absorber[] = {  {&_swigt__p_meep_geom__absorber, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep_geom__cond_profile[] = {  {&_swigt__p_meep_geom__cond_profile, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep_geom__dft_data[] = {  {&_swigt__p_meep_geom__dft_data, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep_geom__fragment_stats[] = {  {&_swigt__p_meep_geom__fragment_stats, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep_geom__geom_epsilon[] = {  {&_swigt__p_meep_geom__geom_epsilon, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep_geom__pol[] = {  {&_swigt__p_meep_geom__pol, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep_geom__susceptibility[] = {  {&_swigt__p_meep_geom__susceptibility, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_meep_geom__symm_matrix[] = {  {&_swigt__p_meep_geom__symm_matrix, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_PyObject[] = {  {&_swigt__p_p_PyObject, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_double[] = {  {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_meep__dft_chunk[] = {  {&_swigt__p_p_meep__dft_chunk, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_meep__fields_chunk[] = {  {&_swigt__p_p_meep__fields_chunk, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_meep__gaussian_src_time[] = {{&_swigt__p_p_meep__gaussian_src_time, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_meep__continuous_src_time[] = {{&_swigt__p_p_meep__continuous_src_time, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_meep__custom_src_time[] = {{&_swigt__p_p_meep__custom_src_time, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_meep__custom_py_src_time[] = {{&_swigt__p_p_meep__custom_py_src_time, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_meep__src_time[] = {  {&_swigt__p_p_meep__src_time, 0, 0, 0},  {&_swigt__p_p_meep__gaussian_src_time, _p_p_meep__gaussian_src_timeTo_p_p_meep__src_time, 0, 0},  {&_swigt__p_p_meep__continuous_src_time, _p_p_meep__continuous_src_timeTo_p_p_meep__src_time, 0, 0},  {&_swigt__p_p_meep__custom_src_time, _p_p_meep__custom_src_timeTo_p_p_meep__src_time, 0, 0},  {&_swigt__p_p_meep__custom_py_src_time, _p_p_meep__custom_py_src_timeTo_p_p_meep__src_time, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_meep__structure_chunk[] = {  {&_swigt__p_p_meep__structure_chunk, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_meep__lorentzian_susceptibility[] = {{&_swigt__p_p_meep__lorentzian_susceptibility, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_meep__noisy_lorentzian_susceptibility[] = {{&_swigt__p_p_meep__noisy_lorentzian_susceptibility, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_meep__gyrotropic_susceptibility[] = {{&_swigt__p_p_meep__gyrotropic_susceptibility, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_meep__multilevel_susceptibility[] = {{&_swigt__p_p_meep__multilevel_susceptibility, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_meep__susceptibility[] = {  {&_swigt__p_p_meep__susceptibility, 0, 0, 0},  {&_swigt__p_p_meep__lorentzian_susceptibility, _p_p_meep__lorentzian_susceptibilityTo_p_p_meep__susceptibility, 0, 0},  {&_swigt__p_p_meep__noisy_lorentzian_susceptibility, _p_p_meep__noisy_lorentzian_susceptibilityTo_p_p_meep__susceptibility, 0, 0},  {&_swigt__p_p_meep__gyrotropic_susceptibility, _p_p_meep__gyrotropic_susceptibilityTo_p_p_meep__susceptibility, 0, 0},  {&_swigt__p_p_meep__multilevel_susceptibility, _p_p_meep__multilevel_susceptibilityTo_p_p_meep__susceptibility, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_p_char[] = {  {&_swigt__p_p_p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_std__complexT_double_t[] = {  {&_swigt__p_p_std__complexT_double_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_void[] = {  {&_swigt__p_p_void, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ptrdiff_t[] = {  {&_swigt__p_ptrdiff_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_scalar_complex[] = {  {&_swigt__p_scalar_complex, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_size_t[] = {  {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_size_type[] = {  {&_swigt__p_size_type, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__allocatorT_double_t[] = {  {&_swigt__p_std__allocatorT_double_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__allocatorT_int_t[] = {  {&_swigt__p_std__allocatorT_int_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__allocatorT_meep__grid_volume_t[] = {  {&_swigt__p_std__allocatorT_meep__grid_volume_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__allocatorT_meep__sourcedata_t[] = {  {&_swigt__p_std__allocatorT_meep__sourcedata_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__allocatorT_meep__volume_t[] = {  {&_swigt__p_std__allocatorT_meep__volume_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__allocatorT_meep_geom__dft_data_t[] = {  {&_swigt__p_std__allocatorT_meep_geom__dft_data_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__allocatorT_meep_geom__fragment_stats_t[] = {  {&_swigt__p_std__allocatorT_meep_geom__fragment_stats_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__allocatorT_size_t_t[] = {  {&_swigt__p_std__allocatorT_size_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__allocatorT_std__complexT_double_t_t[] = {  {&_swigt__p_std__allocatorT_std__complexT_double_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__complexT_double_t[] = {  {&_swigt__p_std__complexT_double_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__complexT_float_t[] = {  {&_swigt__p_std__complexT_float_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__complexT_long_double_t[] = {  {&_swigt__p_std__complexT_long_double_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__invalid_argument[] = {  {&_swigt__p_std__invalid_argument, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__pairT_int_int_t[] = {  {&_swigt__p_std__pairT_int_int_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__unique_ptrT_meep__binary_partition_t[] = {  {&_swigt__p_std__unique_ptrT_meep__binary_partition_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__unordered_mapT_meep__time_sink_double_std__hashT_int_t_t[] = {  {&_swigt__p_std__unordered_mapT_meep__time_sink_double_std__hashT_int_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_double_std__allocatorT_double_t_t[] = {  {&_swigt__p_std__vectorT_double_std__allocatorT_double_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_int_std__allocatorT_int_t_t[] = {  {&_swigt__p_std__vectorT_int_std__allocatorT_int_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t[] = {  {&_swigt__p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_meep__dft_fields_p_std__allocatorT_meep__dft_fields_p_t_t[] = {  {&_swigt__p_std__vectorT_meep__dft_fields_p_std__allocatorT_meep__dft_fields_p_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t[] = {  {&_swigt__p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t[] = {  {&_swigt__p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t[] = {  {&_swigt__p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_meep_geom__absorber_std__allocatorT_meep_geom__absorber_t_t[] = {  {&_swigt__p_std__vectorT_meep_geom__absorber_std__allocatorT_meep_geom__absorber_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t[] = {  {&_swigt__p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t[] = {  {&_swigt__p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_ptrdiff_t_std__allocatorT_ptrdiff_t_t_t[] = {  {&_swigt__p_std__vectorT_ptrdiff_t_std__allocatorT_ptrdiff_t_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_size_t_std__allocatorT_size_t_t_t[] = {  {&_swigt__p_std__vectorT_size_t_std__allocatorT_size_t_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t[] = {  {&_swigt__p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_swig__SwigPyIterator[] = {  {&_swigt__p_swig__SwigPyIterator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_user_material_func[] = {  {&_swigt__p_user_material_func, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_value_type[] = {  {&_swigt__p_value_type, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_vector3[] = {  {&_swigt__p_vector3, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_void[] = {  {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};

static swig_cast_info *swig_cast_initial[] = {
  _swigc__p_FILE,
  _swigc__p_GEOMETRIC_OBJECT,
  _swigc__p_a_2__meep_geom__cond_profile,
  _swigc__p_a_2__p_double,
  _swigc__p_a_5__bool,
  _swigc__p_a_5__meep__boundary_condition,
  _swigc__p_a_5__p_double,
  _swigc__p_a_9__std__complexT_double_t,
  _swigc__p_access_mode,
  _swigc__p_allocator_type,
  _swigc__p_amplitude_function,
  _swigc__p_bool,
  _swigc__p_boundary_region_kind,
  _swigc__p_char,
  _swigc__p_difference_type,
  _swigc__p_double,
  _swigc__p_evectmatrix,
  _swigc__p_f_double_int_p_void__meep__vec,
  _swigc__p_f_double_p_void__double,
  _swigc__p_f_double_p_void__std__complexT_double_t,
  _swigc__p_f_int_p_double_p_void__double,
  _swigc__p_f_p_meep__fields_chunk_int_enum_meep__component_meep__ivec_meep__ivec_meep__vec_meep__vec_meep__vec_meep__vec_double_double_meep__ivec_std__complex__double___r_q_const__meep__symmetry_int_p_void__void,
  _swigc__p_f_p_q_const__char__void,
  _swigc__p_f_p_q_const__std__complex__double___r_q_const__meep__vec_p_void__double,
  _swigc__p_f_p_q_const__std__complex__meep__realnum___r_q_const__meep__vec_p_void__std__complexT_double_t,
  _swigc__p_f_std__complex__double____std__complexT_double_t,
  _swigc__p_float,
  _swigc__p_geom_box,
  _swigc__p_geom_box_tree,
  _swigc__p_geometric_object,
  _swigc__p_geometric_object_list,
  _swigc__p_int,
  _swigc__p_long_double,
  _swigc__p_material_data,
  _swigc__p_material_type,
  _swigc__p_material_type_list,
  _swigc__p_maxwell_data,
  _swigc__p_meep__binary_partition,
  _swigc__p_meep__boundary_region,
  _swigc__p_meep__chunkloop_field_components,
  _swigc__p_meep__comms_key,
  _swigc__p_meep__component,
  _swigc__p_meep__continuous_src_time,
  _swigc__p_meep__custom_py_src_time,
  _swigc__p_meep__custom_src_time,
  _swigc__p_meep__dft_chunk,
  _swigc__p_meep__dft_energy,
  _swigc__p_meep__dft_fields,
  _swigc__p_meep__dft_flux,
  _swigc__p_meep__dft_force,
  _swigc__p_meep__dft_ldos,
  _swigc__p_meep__dft_near2far,
  _swigc__p_meep__diffractedplanewave,
  _swigc__p_meep__direction,
  _swigc__p_meep__eigenmode_data,
  _swigc__p_meep__fields,
  _swigc__p_meep__fields_chunk,
  _swigc__p_meep__flux_vol,
  _swigc__p_meep__gaussian_src_time,
  _swigc__p_meep__gaussianbeam,
  _swigc__p_meep__grid_volume,
  _swigc__p_meep__gyrotropic_susceptibility,
  _swigc__p_meep__gyrotropy_model,
  _swigc__p_meep__h5file,
  _swigc__p_meep__h5file__extending_s,
  _swigc__p_meep__initialize,
  _swigc__p_meep__ivec,
  _swigc__p_meep__lorentzian_susceptibility,
  _swigc__p_meep__material_function,
  _swigc__p_meep__monitor_point,
  _swigc__p_meep__multilevel_susceptibility,
  _swigc__p_meep__noisy_lorentzian_susceptibility,
  _swigc__p_meep__polarization_state_s,
  _swigc__p_meep__signed_direction,
  _swigc__p_meep__simple_material_function,
  _swigc__p_meep__sourcedata,
  _swigc__p_meep__split_plane,
  _swigc__p_meep__src_time,
  _swigc__p_meep__structure,
  _swigc__p_meep__structure_chunk,
  _swigc__p_meep__susceptibility,
  _swigc__p_meep__symmetry,
  _swigc__p_meep__vec,
  _swigc__p_meep__volume,
  _swigc__p_meep__volume_list,
  _swigc__p_meep_geom__absorber,
  _swigc__p_meep_geom__cond_profile,
  _swigc__p_meep_geom__dft_data,
  _swigc__p_meep_geom__fragment_stats,
  _swigc__p_meep_geom__geom_epsilon,
  _swigc__p_meep_geom__pol,
  _swigc__p_meep_geom__susceptibility,
  _swigc__p_meep_geom__symm_matrix,
  _swigc__p_p_PyObject,
  _swigc__p_p_double,
  _swigc__p_p_meep__continuous_src_time,
  _swigc__p_p_meep__custom_py_src_time,
  _swigc__p_p_meep__custom_src_time,
  _swigc__p_p_meep__dft_chunk,
  _swigc__p_p_meep__fields_chunk,
  _swigc__p_p_meep__gaussian_src_time,
  _swigc__p_p_meep__gyrotropic_susceptibility,
  _swigc__p_p_meep__lorentzian_susceptibility,
  _swigc__p_p_meep__multilevel_susceptibility,
  _swigc__p_p_meep__noisy_lorentzian_susceptibility,
  _swigc__p_p_meep__src_time,
  _swigc__p_p_meep__structure_chunk,
  _swigc__p_p_meep__susceptibility,
  _swigc__p_p_p_char,
  _swigc__p_p_std__complexT_double_t,
  _swigc__p_p_void,
  _swigc__p_ptrdiff_t,
  _swigc__p_scalar_complex,
  _swigc__p_size_t,
  _swigc__p_size_type,
  _swigc__p_std__allocatorT_double_t,
  _swigc__p_std__allocatorT_int_t,
  _swigc__p_std__allocatorT_meep__grid_volume_t,
  _swigc__p_std__allocatorT_meep__sourcedata_t,
  _swigc__p_std__allocatorT_meep__volume_t,
  _swigc__p_std__allocatorT_meep_geom__dft_data_t,
  _swigc__p_std__allocatorT_meep_geom__fragment_stats_t,
  _swigc__p_std__allocatorT_size_t_t,
  _swigc__p_std__allocatorT_std__complexT_double_t_t,
  _swigc__p_std__complexT_double_t,
  _swigc__p_std__complexT_float_t,
  _swigc__p_std__complexT_long_double_t,
  _swigc__p_std__invalid_argument,
  _swigc__p_std__pairT_int_int_t,
  _swigc__p_std__unique_ptrT_meep__binary_partition_t,
  _swigc__p_std__unordered_mapT_meep__time_sink_double_std__hashT_int_t_t,
  _swigc__p_std__vectorT_double_std__allocatorT_double_t_t,
  _swigc__p_std__vectorT_int_std__allocatorT_int_t_t,
  _swigc__p_std__vectorT_meep__component_std__allocatorT_meep__component_t_t,
  _swigc__p_std__vectorT_meep__dft_fields_p_std__allocatorT_meep__dft_fields_p_t_t,
  _swigc__p_std__vectorT_meep__grid_volume_std__allocatorT_meep__grid_volume_t_t,
  _swigc__p_std__vectorT_meep__sourcedata_std__allocatorT_meep__sourcedata_t_t,
  _swigc__p_std__vectorT_meep__volume_std__allocatorT_meep__volume_t_t,
  _swigc__p_std__vectorT_meep_geom__absorber_std__allocatorT_meep_geom__absorber_t_t,
  _swigc__p_std__vectorT_meep_geom__dft_data_std__allocatorT_meep_geom__dft_data_t_t,
  _swigc__p_std__vectorT_meep_geom__fragment_stats_std__allocatorT_meep_geom__fragment_stats_t_t,
  _swigc__p_std__vectorT_ptrdiff_t_std__allocatorT_ptrdiff_t_t_t,
  _swigc__p_std__vectorT_size_t_std__allocatorT_size_t_t_t,
  _swigc__p_std__vectorT_std__complexT_double_t_std__allocatorT_std__complexT_double_t_t_t,
  _swigc__p_swig__SwigPyIterator,
  _swigc__p_user_material_func,
  _swigc__p_value_type,
  _swigc__p_vector3,
  _swigc__p_void,
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */

static swig_const_info swig_const_table[] = {
{ SWIG_PY_POINTER, "py_pml_profile", 0, 0, (void *)(py_pml_profile), &SWIGTYPE_p_f_double_p_void__double },
{ SWIG_PY_POINTER, "py_master_printf_wrap", 0, 0, (void *)(py_master_printf_wrap), &SWIGTYPE_p_f_p_q_const__char__void },
{ SWIG_PY_POINTER, "py_master_printf_stderr_wrap", 0, 0, (void *)(py_master_printf_stderr_wrap), &SWIGTYPE_p_f_p_q_const__char__void },
{0, 0, 0, 0.0, 0, 0}};

#ifdef __cplusplus
}
#endif
/* -----------------------------------------------------------------------------
 * Type initialization:
 * This problem is tough by the requirement that no dynamic
 * memory is used. Also, since swig_type_info structures store pointers to
 * swig_cast_info structures and swig_cast_info structures store pointers back
 * to swig_type_info structures, we need some lookup code at initialization.
 * The idea is that swig generates all the structures that are needed.
 * The runtime then collects these partially filled structures.
 * The SWIG_InitializeModule function takes these initial arrays out of
 * swig_module, and does all the lookup, filling in the swig_module.types
 * array with the correct data and linking the correct swig_cast_info
 * structures together.
 *
 * The generated swig_type_info structures are assigned statically to an initial
 * array. We just loop through that array, and handle each type individually.
 * First we lookup if this type has been already loaded, and if so, use the
 * loaded structure instead of the generated one. Then we have to fill in the
 * cast linked list. The cast data is initially stored in something like a
 * two-dimensional array. Each row corresponds to a type (there are the same
 * number of rows as there are in the swig_type_initial array). Each entry in
 * a column is one of the swig_cast_info structures for that type.
 * The cast_initial array is actually an array of arrays, because each row has
 * a variable number of columns. So to actually build the cast linked list,
 * we find the array of casts associated with the type, and loop through it
 * adding the casts to the list. The one last trick we need to do is making
 * sure the type pointer in the swig_cast_info struct is correct.
 *
 * First off, we lookup the cast->type name to see if it is already loaded.
 * There are three cases to handle:
 *  1) If the cast->type has already been loaded AND the type we are adding
 *     casting info to has not been loaded (it is in this module), THEN we
 *     replace the cast->type pointer with the type pointer that has already
 *     been loaded.
 *  2) If BOTH types (the one we are adding casting info to, and the
 *     cast->type) are loaded, THEN the cast info has already been loaded by
 *     the previous module so we just ignore it.
 *  3) Finally, if cast->type has not already been loaded, then we add that
 *     swig_cast_info to the linked list (because the cast->type) pointer will
 *     be correct.
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#if 0
} /* c-mode */
#endif
#endif

#if 0
#define SWIGRUNTIME_DEBUG
#endif


SWIGRUNTIME void
SWIG_InitializeModule(void *clientdata) {
  size_t i;
  swig_module_info *module_head, *iter;
  int init;
  
  /* check to see if the circular list has been setup, if not, set it up */
  if (swig_module.next==0) {
    /* Initialize the swig_module */
    swig_module.type_initial = swig_type_initial;
    swig_module.cast_initial = swig_cast_initial;
    swig_module.next = &swig_module;
    init = 1;
  } else {
    init = 0;
  }
  
  /* Try and load any already created modules */
  module_head = SWIG_GetModule(clientdata);
  if (!module_head) {
    /* This is the first module loaded for this interpreter */
    /* so set the swig module into the interpreter */
    SWIG_SetModule(clientdata, &swig_module);
  } else {
    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
    iter=module_head;
    do {
      if (iter==&swig_module) {
        /* Our module is already in the list, so there's nothing more to do. */
        return;
      }
      iter=iter->next;
    } while (iter!= module_head);
    
    /* otherwise we must add our module into the list */
    swig_module.next = module_head->next;
    module_head->next = &swig_module;
  }
  
  /* When multiple interpreters are used, a module could have already been initialized in
       a different interpreter, but not yet have a pointer in this interpreter.
       In this case, we do not want to continue adding types... everything should be
       set up already */
  if (init == 0) return;
  
  /* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
  printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
#endif
  for (i = 0; i < swig_module.size; ++i) {
    swig_type_info *type = 0;
    swig_type_info *ret;
    swig_cast_info *cast;
    
#ifdef SWIGRUNTIME_DEBUG
    printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
#endif
    
    /* if there is another module already loaded */
    if (swig_module.next != &swig_module) {
      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
    }
    if (type) {
      /* Overwrite clientdata field */
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: found type %s\n", type->name);
#endif
      if (swig_module.type_initial[i]->clientdata) {
        type->clientdata = swig_module.type_initial[i]->clientdata;
#ifdef SWIGRUNTIME_DEBUG
        printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
#endif
      }
    } else {
      type = swig_module.type_initial[i];
    }
    
    /* Insert casting types */
    cast = swig_module.cast_initial[i];
    while (cast->type) {
      /* Don't need to add information already in the list */
      ret = 0;
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
#endif
      if (swig_module.next != &swig_module) {
        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
#ifdef SWIGRUNTIME_DEBUG
        if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
#endif
      }
      if (ret) {
        if (type == swig_module.type_initial[i]) {
#ifdef SWIGRUNTIME_DEBUG
          printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
#endif
          cast->type = ret;
          ret = 0;
        } else {
          /* Check for casting already in the list */
          swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
#ifdef SWIGRUNTIME_DEBUG
          if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
#endif
          if (!ocast) ret = 0;
        }
      }
      
      if (!ret) {
#ifdef SWIGRUNTIME_DEBUG
        printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
#endif
        if (type->cast) {
          type->cast->prev = cast;
          cast->next = type->cast;
        }
        type->cast = cast;
      }
      cast++;
    }
    /* Set entry in modules->types array equal to the type */
    swig_module.types[i] = type;
  }
  swig_module.types[i] = 0;
  
#ifdef SWIGRUNTIME_DEBUG
  printf("**** SWIG_InitializeModule: Cast List ******\n");
  for (i = 0; i < swig_module.size; ++i) {
    int j = 0;
    swig_cast_info *cast = swig_module.cast_initial[i];
    printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
    while (cast->type) {
      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
      cast++;
      ++j;
    }
    printf("---- Total casts: %d\n",j);
  }
  printf("**** SWIG_InitializeModule: Cast List ******\n");
#endif
}

/* This function will propagate the clientdata field of type to
* any new swig_type_info structures that have been added into the list
* of equivalent types.  It is like calling
* SWIG_TypeClientData(type, clientdata) a second time.
*/
SWIGRUNTIME void
SWIG_PropagateClientData(void) {
  size_t i;
  swig_cast_info *equiv;
  static int init_run = 0;
  
  if (init_run) return;
  init_run = 1;
  
  for (i = 0; i < swig_module.size; i++) {
    if (swig_module.types[i]->clientdata) {
      equiv = swig_module.types[i]->cast;
      while (equiv) {
        if (!equiv->converter) {
          if (equiv->type && !equiv->type->clientdata)
          SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
        }
        equiv = equiv->next;
      }
    }
  }
}

#ifdef __cplusplus
#if 0
{
  /* c-mode */
#endif
}
#endif



#ifdef __cplusplus
extern "C" {
#endif
  
  /* Python-specific SWIG API */
#define SWIG_newvarlink()                             SWIG_Python_newvarlink()
#define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
#define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
  
  /* -----------------------------------------------------------------------------
   * global variable support code.
   * ----------------------------------------------------------------------------- */
  
  typedef struct swig_globalvar {
    char       *name;                  /* Name of global variable */
    PyObject *(*get_attr)(void);       /* Return the current value */
    int       (*set_attr)(PyObject *); /* Set the value */
    struct swig_globalvar *next;
  } swig_globalvar;
  
  typedef struct swig_varlinkobject {
    PyObject_HEAD
    swig_globalvar *vars;
  } swig_varlinkobject;
  
  SWIGINTERN PyObject *
  swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
#if PY_VERSION_HEX >= 0x03000000
    return PyUnicode_InternFromString("<Swig global variables>");
#else
    return PyString_FromString("<Swig global variables>");
#endif
  }
  
  SWIGINTERN PyObject *
  swig_varlink_str(swig_varlinkobject *v) {
#if PY_VERSION_HEX >= 0x03000000
    PyObject *str = PyUnicode_InternFromString("(");
    PyObject *tail;
    PyObject *joined;
    swig_globalvar *var;
    for (var = v->vars; var; var=var->next) {
      tail = PyUnicode_FromString(var->name);
      joined = PyUnicode_Concat(str, tail);
      Py_DecRef(str);
      Py_DecRef(tail);
      str = joined;
      if (var->next) {
        tail = PyUnicode_InternFromString(", ");
        joined = PyUnicode_Concat(str, tail);
        Py_DecRef(str);
        Py_DecRef(tail);
        str = joined;
      }
    }
    tail = PyUnicode_InternFromString(")");
    joined = PyUnicode_Concat(str, tail);
    Py_DecRef(str);
    Py_DecRef(tail);
    str = joined;
#else
    PyObject *str = PyString_FromString("(");
    swig_globalvar *var;
    for (var = v->vars; var; var=var->next) {
      PyString_ConcatAndDel(&str,PyString_FromString(var->name));
      if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
    }
    PyString_ConcatAndDel(&str,PyString_FromString(")"));
#endif
    return str;
  }
  
  SWIGINTERN void
  swig_varlink_dealloc(swig_varlinkobject *v) {
    swig_globalvar *var = v->vars;
    while (var) {
      swig_globalvar *n = var->next;
      free(var->name);
      free(var);
      var = n;
    }
  }
  
  SWIGINTERN PyObject *
  swig_varlink_getattr(swig_varlinkobject *v, char *n) {
    PyObject *res = NULL;
    swig_globalvar *var = v->vars;
    while (var) {
      if (strcmp(var->name,n) == 0) {
        res = (*var->get_attr)();
        break;
      }
      var = var->next;
    }
    if (res == NULL && !PyErr_Occurred()) {
      PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
    }
    return res;
  }
  
  SWIGINTERN int
  swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
    int res = 1;
    swig_globalvar *var = v->vars;
    while (var) {
      if (strcmp(var->name,n) == 0) {
        res = (*var->set_attr)(p);
        break;
      }
      var = var->next;
    }
    if (res == 1 && !PyErr_Occurred()) {
      PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
    }
    return res;
  }
  
  SWIGINTERN PyTypeObject*
  swig_varlink_type(void) {
    static char varlink__doc__[] = "Swig var link object";
    static PyTypeObject varlink_type;
    static int type_init = 0;
    if (!type_init) {
      const PyTypeObject tmp = {
#if PY_VERSION_HEX >= 0x03000000
        PyVarObject_HEAD_INIT(NULL, 0)
#else
        PyObject_HEAD_INIT(NULL)
        0,                                  /* ob_size */
#endif
        "swigvarlink",                      /* tp_name */
        sizeof(swig_varlinkobject),         /* tp_basicsize */
        0,                                  /* tp_itemsize */
        (destructor) swig_varlink_dealloc,  /* tp_dealloc */
        0,                                  /* tp_print */
        (getattrfunc) swig_varlink_getattr, /* tp_getattr */
        (setattrfunc) swig_varlink_setattr, /* tp_setattr */
        0,                                  /* tp_compare */
        (reprfunc) swig_varlink_repr,       /* tp_repr */
        0,                                  /* tp_as_number */
        0,                                  /* tp_as_sequence */
        0,                                  /* tp_as_mapping */
        0,                                  /* tp_hash */
        0,                                  /* tp_call */
        (reprfunc) swig_varlink_str,        /* tp_str */
        0,                                  /* tp_getattro */
        0,                                  /* tp_setattro */
        0,                                  /* tp_as_buffer */
        0,                                  /* tp_flags */
        varlink__doc__,                     /* tp_doc */
        0,                                  /* tp_traverse */
        0,                                  /* tp_clear */
        0,                                  /* tp_richcompare */
        0,                                  /* tp_weaklistoffset */
        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
        0,                                  /* tp_del */
        0,                                  /* tp_version_tag */
#if PY_VERSION_HEX >= 0x03040000
        0,                                  /* tp_finalize */
#endif
#if PY_VERSION_HEX >= 0x03080000
        0,                                  /* tp_vectorcall */
#endif
#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
        0,                                  /* tp_print */
#endif
#ifdef COUNT_ALLOCS
        0,                                  /* tp_allocs */
        0,                                  /* tp_frees */
        0,                                  /* tp_maxalloc */
        0,                                  /* tp_prev */
        0                                   /* tp_next */
#endif
      };
      varlink_type = tmp;
      type_init = 1;
      if (PyType_Ready(&varlink_type) < 0)
      return NULL;
    }
    return &varlink_type;
  }
  
  /* Create a variable linking object for use later */
  SWIGINTERN PyObject *
  SWIG_Python_newvarlink(void) {
    swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
    if (result) {
      result->vars = 0;
    }
    return ((PyObject*) result);
  }
  
  SWIGINTERN void 
  SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
    swig_varlinkobject *v = (swig_varlinkobject *) p;
    swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
    if (gv) {
      size_t size = strlen(name)+1;
      gv->name = (char *)malloc(size);
      if (gv->name) {
        memcpy(gv->name, name, size);
        gv->get_attr = get_attr;
        gv->set_attr = set_attr;
        gv->next = v->vars;
      }
    }
    v->vars = gv;
  }
  
  SWIGINTERN PyObject *
  SWIG_globals(void) {
    static PyObject *globals = 0;
    if (!globals) {
      globals = SWIG_newvarlink();
    }
    return globals;
  }
  
  /* -----------------------------------------------------------------------------
   * constants/methods manipulation
   * ----------------------------------------------------------------------------- */
  
  /* Install Constants */
  SWIGINTERN void
  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
    PyObject *obj = 0;
    size_t i;
    for (i = 0; constants[i].type; ++i) {
      switch(constants[i].type) {
      case SWIG_PY_POINTER:
        obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
        break;
      case SWIG_PY_BINARY:
        obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
        break;
      default:
        obj = 0;
        break;
      }
      if (obj) {
        PyDict_SetItemString(d, constants[i].name, obj);
        Py_DECREF(obj);
      }
    }
  }
  
  /* -----------------------------------------------------------------------------*/
  /* Fix SwigMethods to carry the callback ptrs when needed */
  /* -----------------------------------------------------------------------------*/
  
  SWIGINTERN void
  SWIG_Python_FixMethods(PyMethodDef *methods,
    swig_const_info *const_table,
    swig_type_info **types,
    swig_type_info **types_initial) {
    size_t i;
    for (i = 0; methods[i].ml_name; ++i) {
      const char *c = methods[i].ml_doc;
      if (!c) continue;
      c = strstr(c, "swig_ptr: ");
      if (c) {
        int j;
        swig_const_info *ci = 0;
        const char *name = c + 10;
        for (j = 0; const_table[j].type; ++j) {
          if (strncmp(const_table[j].name, name, 
              strlen(const_table[j].name)) == 0) {
            ci = &(const_table[j]);
            break;
          }
        }
        if (ci) {
          void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
          if (ptr) {
            size_t shift = (ci->ptype) - types;
            swig_type_info *ty = types_initial[shift];
            size_t ldoc = (c - methods[i].ml_doc);
            size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
            char *ndoc = (char*)malloc(ldoc + lptr + 10);
            if (ndoc) {
              char *buff = ndoc;
              memcpy(buff, methods[i].ml_doc, ldoc);
              buff += ldoc;
              memcpy(buff, "swig_ptr: ", 10);
              buff += 10;
              SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
              methods[i].ml_doc = ndoc;
            }
          }
        }
      }
    }
  } 
  
  /* -----------------------------------------------------------------------------
   * Method creation and docstring support functions
   * ----------------------------------------------------------------------------- */
  
  /* -----------------------------------------------------------------------------
   * Function to find the method definition with the correct docstring for the
   * proxy module as opposed to the low-level API
   * ----------------------------------------------------------------------------- */
  
  SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) {
    /* Find the function in the modified method table */
    size_t offset = 0;
    int found = 0;
    while (SwigMethods_proxydocs[offset].ml_meth != NULL) {
      if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) {
        found = 1;
        break;
      }
      offset++;
    }
    /* Use the copy with the modified docstring if available */
    return found ? &SwigMethods_proxydocs[offset] : NULL;
  }
  
  /* -----------------------------------------------------------------------------
   * Wrapper of PyInstanceMethod_New() used in Python 3
   * It is exported to the generated module, used for -fastproxy
   * ----------------------------------------------------------------------------- */
  
  SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
    if (PyCFunction_Check(func)) {
      PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
      PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
      if (ml)
      func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
    }
#if PY_VERSION_HEX >= 0x03000000
    return PyInstanceMethod_New(func);
#else
    return PyMethod_New(func, NULL, NULL);
#endif
  }
  
  /* -----------------------------------------------------------------------------
   * Wrapper of PyStaticMethod_New()
   * It is exported to the generated module, used for -fastproxy
   * ----------------------------------------------------------------------------- */
  
  SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
    if (PyCFunction_Check(func)) {
      PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
      PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
      if (ml)
      func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
    }
    return PyStaticMethod_New(func);
  }
  
#ifdef __cplusplus
}
#endif

/* -----------------------------------------------------------------------------*
 *  Partial Init method
 * -----------------------------------------------------------------------------*/

#ifdef __cplusplus
extern "C"
#endif

SWIGEXPORT 
#if PY_VERSION_HEX >= 0x03000000
PyObject*
#else
void
#endif
SWIG_init(void) {
  PyObject *m, *d, *md, *globals;
  
#if PY_VERSION_HEX >= 0x03000000
  static struct PyModuleDef SWIG_module = {
    PyModuleDef_HEAD_INIT,
    SWIG_name,
    NULL,
    -1,
    SwigMethods,
    NULL,
    NULL,
    NULL,
    NULL
  };
#endif
  
#if defined(SWIGPYTHON_BUILTIN)
  static SwigPyClientData SwigPyObject_clientdata = {
    0, 0, 0, 0, 0, 0, 0
  };
  static PyGetSetDef this_getset_def = {
    (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
  };
  static SwigPyGetSet thisown_getset_closure = {
    SwigPyObject_own,
    SwigPyObject_own
  };
  static PyGetSetDef thisown_getset_def = {
    (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
  };
  PyTypeObject *builtin_pytype;
  int builtin_base_count;
  swig_type_info *builtin_basetype;
  PyObject *tuple;
  PyGetSetDescrObject *static_getset;
  PyTypeObject *metatype;
  PyTypeObject *swigpyobject;
  SwigPyClientData *cd;
  PyObject *public_interface, *public_symbol;
  PyObject *this_descr;
  PyObject *thisown_descr;
  PyObject *self = 0;
  int i;
  
  (void)builtin_pytype;
  (void)builtin_base_count;
  (void)builtin_basetype;
  (void)tuple;
  (void)static_getset;
  (void)self;
  
  /* Metaclass is used to implement static member variables */
  metatype = SwigPyObjectType();
  assert(metatype);
#endif
  
  (void)globals;
  
  /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
  SWIG_This();
  SWIG_Python_TypeCache();
  SwigPyPacked_type();
#ifndef SWIGPYTHON_BUILTIN
  SwigPyObject_type();
#endif
  
  /* Fix SwigMethods to carry the callback ptrs when needed */
  SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
  
#if PY_VERSION_HEX >= 0x03000000
  m = PyModule_Create(&SWIG_module);
#else
  m = Py_InitModule(SWIG_name, SwigMethods);
#endif
  
  md = d = PyModule_GetDict(m);
  (void)md;
  
  SWIG_InitializeModule(0);
  
#ifdef SWIGPYTHON_BUILTIN
  swigpyobject = SwigPyObject_TypeOnce();
  
  SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
  assert(SwigPyObject_stype);
  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
  if (!cd) {
    SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
    SwigPyObject_clientdata.pytype = swigpyobject;
  } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
    PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
# if PY_VERSION_HEX >= 0x03000000
    return NULL;
# else
    return;
# endif
  }
  
  /* All objects have a 'this' attribute */
  this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
  (void)this_descr;
  
  /* All objects have a 'thisown' attribute */
  thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
  (void)thisown_descr;
  
  public_interface = PyList_New(0);
  public_symbol = 0;
  (void)public_symbol;
  
  PyDict_SetItemString(md, "__all__", public_interface);
  Py_DECREF(public_interface);
  for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
  SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
  for (i = 0; swig_const_table[i].name != 0; ++i)
  SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
#endif
  
  SWIG_InstallConstants(d,swig_const_table);
  
  
  import_array();
  
  
  
  
  
  // thread safe initialization
  swig::container_owner_attribute();
  
  globals = SWIG_globals();
  if (!globals) {
    PyErr_SetString(PyExc_TypeError, "Failure to create SWIG globals.");
#if PY_VERSION_HEX >= 0x03000000
    return NULL;
#else
    return;
#endif
  }
  PyDict_SetItemString(md, "cvar", globals);
  Py_DECREF(globals);
  SWIG_addvarlink(globals, "NUM_FIELD_COMPONENTS", Swig_var_NUM_FIELD_COMPONENTS_get, Swig_var_NUM_FIELD_COMPONENTS_set);
  SWIG_addvarlink(globals, "NUM_FIELD_TYPES", Swig_var_NUM_FIELD_TYPES_get, Swig_var_NUM_FIELD_TYPES_set);
  SWIG_Python_SetConstant(d, "Ex",SWIG_From_int(static_cast< int >(meep::Ex)));
  SWIG_Python_SetConstant(d, "Ey",SWIG_From_int(static_cast< int >(meep::Ey)));
  SWIG_Python_SetConstant(d, "Er",SWIG_From_int(static_cast< int >(meep::Er)));
  SWIG_Python_SetConstant(d, "Ep",SWIG_From_int(static_cast< int >(meep::Ep)));
  SWIG_Python_SetConstant(d, "Ez",SWIG_From_int(static_cast< int >(meep::Ez)));
  SWIG_Python_SetConstant(d, "Hx",SWIG_From_int(static_cast< int >(meep::Hx)));
  SWIG_Python_SetConstant(d, "Hy",SWIG_From_int(static_cast< int >(meep::Hy)));
  SWIG_Python_SetConstant(d, "Hr",SWIG_From_int(static_cast< int >(meep::Hr)));
  SWIG_Python_SetConstant(d, "Hp",SWIG_From_int(static_cast< int >(meep::Hp)));
  SWIG_Python_SetConstant(d, "Hz",SWIG_From_int(static_cast< int >(meep::Hz)));
  SWIG_Python_SetConstant(d, "Dx",SWIG_From_int(static_cast< int >(meep::Dx)));
  SWIG_Python_SetConstant(d, "Dy",SWIG_From_int(static_cast< int >(meep::Dy)));
  SWIG_Python_SetConstant(d, "Dr",SWIG_From_int(static_cast< int >(meep::Dr)));
  SWIG_Python_SetConstant(d, "Dp",SWIG_From_int(static_cast< int >(meep::Dp)));
  SWIG_Python_SetConstant(d, "Dz",SWIG_From_int(static_cast< int >(meep::Dz)));
  SWIG_Python_SetConstant(d, "Bx",SWIG_From_int(static_cast< int >(meep::Bx)));
  SWIG_Python_SetConstant(d, "By",SWIG_From_int(static_cast< int >(meep::By)));
  SWIG_Python_SetConstant(d, "Br",SWIG_From_int(static_cast< int >(meep::Br)));
  SWIG_Python_SetConstant(d, "Bp",SWIG_From_int(static_cast< int >(meep::Bp)));
  SWIG_Python_SetConstant(d, "Bz",SWIG_From_int(static_cast< int >(meep::Bz)));
  SWIG_Python_SetConstant(d, "Dielectric",SWIG_From_int(static_cast< int >(meep::Dielectric)));
  SWIG_Python_SetConstant(d, "Permeability",SWIG_From_int(static_cast< int >(meep::Permeability)));
  SWIG_Python_SetConstant(d, "NO_COMPONENT",SWIG_From_int(static_cast< int >(meep::NO_COMPONENT)));
  SWIG_addvarlink(globals, "Centered", Swig_var_Centered_get, Swig_var_Centered_set);
  SWIG_Python_SetConstant(d, "Sx",SWIG_From_int(static_cast< int >(meep::Sx)));
  SWIG_Python_SetConstant(d, "Sy",SWIG_From_int(static_cast< int >(meep::Sy)));
  SWIG_Python_SetConstant(d, "Sr",SWIG_From_int(static_cast< int >(meep::Sr)));
  SWIG_Python_SetConstant(d, "Sp",SWIG_From_int(static_cast< int >(meep::Sp)));
  SWIG_Python_SetConstant(d, "Sz",SWIG_From_int(static_cast< int >(meep::Sz)));
  SWIG_Python_SetConstant(d, "EnergyDensity",SWIG_From_int(static_cast< int >(meep::EnergyDensity)));
  SWIG_Python_SetConstant(d, "D_EnergyDensity",SWIG_From_int(static_cast< int >(meep::D_EnergyDensity)));
  SWIG_Python_SetConstant(d, "H_EnergyDensity",SWIG_From_int(static_cast< int >(meep::H_EnergyDensity)));
  SWIG_Python_SetConstant(d, "D1",SWIG_From_int(static_cast< int >(meep::D1)));
  SWIG_Python_SetConstant(d, "D2",SWIG_From_int(static_cast< int >(meep::D2)));
  SWIG_Python_SetConstant(d, "D3",SWIG_From_int(static_cast< int >(meep::D3)));
  SWIG_Python_SetConstant(d, "Dcyl",SWIG_From_int(static_cast< int >(meep::Dcyl)));
  SWIG_Python_SetConstant(d, "E_stuff",SWIG_From_int(static_cast< int >(meep::E_stuff)));
  SWIG_Python_SetConstant(d, "H_stuff",SWIG_From_int(static_cast< int >(meep::H_stuff)));
  SWIG_Python_SetConstant(d, "D_stuff",SWIG_From_int(static_cast< int >(meep::D_stuff)));
  SWIG_Python_SetConstant(d, "B_stuff",SWIG_From_int(static_cast< int >(meep::B_stuff)));
  SWIG_Python_SetConstant(d, "PE_stuff",SWIG_From_int(static_cast< int >(meep::PE_stuff)));
  SWIG_Python_SetConstant(d, "PH_stuff",SWIG_From_int(static_cast< int >(meep::PH_stuff)));
  SWIG_Python_SetConstant(d, "WE_stuff",SWIG_From_int(static_cast< int >(meep::WE_stuff)));
  SWIG_Python_SetConstant(d, "WH_stuff",SWIG_From_int(static_cast< int >(meep::WH_stuff)));
  SWIG_Python_SetConstant(d, "High",SWIG_From_int(static_cast< int >(meep::High)));
  SWIG_Python_SetConstant(d, "Low",SWIG_From_int(static_cast< int >(meep::Low)));
  SWIG_Python_SetConstant(d, "X",SWIG_From_int(static_cast< int >(meep::X)));
  SWIG_Python_SetConstant(d, "Y",SWIG_From_int(static_cast< int >(meep::Y)));
  SWIG_Python_SetConstant(d, "Z",SWIG_From_int(static_cast< int >(meep::Z)));
  SWIG_Python_SetConstant(d, "R",SWIG_From_int(static_cast< int >(meep::R)));
  SWIG_Python_SetConstant(d, "P",SWIG_From_int(static_cast< int >(meep::P)));
  SWIG_Python_SetConstant(d, "NO_DIRECTION",SWIG_From_int(static_cast< int >(meep::NO_DIRECTION)));
  SWIG_Python_SetConstant(d, "MEEP_MIN_OUTPUT_TIME",SWIG_From_double(static_cast< double >(4.0)));
  SWIG_addvarlink(globals, "verbosity", Swig_var_verbosity_get, Swig_var_verbosity_set);
  SWIG_addvarlink(globals, "pi", Swig_var_pi_get, Swig_var_pi_set);
  SWIG_addvarlink(globals, "nan", Swig_var_nan_get, Swig_var_nan_set);
  SWIG_Python_SetConstant(d, "GYROTROPIC_LORENTZIAN",SWIG_From_int(static_cast< int >(meep::GYROTROPIC_LORENTZIAN)));
  SWIG_Python_SetConstant(d, "GYROTROPIC_DRUDE",SWIG_From_int(static_cast< int >(meep::GYROTROPIC_DRUDE)));
  SWIG_Python_SetConstant(d, "GYROTROPIC_SATURATED",SWIG_From_int(static_cast< int >(meep::GYROTROPIC_SATURATED)));
  SWIG_Python_SetConstant(d, "h5file_READONLY",SWIG_From_int(static_cast< int >(meep::h5file::READONLY)));
  SWIG_Python_SetConstant(d, "h5file_READWRITE",SWIG_From_int(static_cast< int >(meep::h5file::READWRITE)));
  SWIG_Python_SetConstant(d, "h5file_WRITE",SWIG_From_int(static_cast< int >(meep::h5file::WRITE)));
  SWIG_Python_SetConstant(d, "DEFAULT_SUBPIXEL_TOL",SWIG_From_double(static_cast< double >(1e-4)));
  SWIG_Python_SetConstant(d, "DEFAULT_SUBPIXEL_MAXEVAL",SWIG_From_int(static_cast< int >(100000)));
  SWIG_Python_SetConstant(d, "boundary_region_NOTHING_SPECIAL",SWIG_From_int(static_cast< int >(meep::boundary_region::NOTHING_SPECIAL)));
  SWIG_Python_SetConstant(d, "boundary_region_PML",SWIG_From_int(static_cast< int >(meep::boundary_region::PML)));
  SWIG_Python_SetConstant(d, "Incoming",SWIG_From_int(static_cast< int >(meep::Incoming)));
  SWIG_Python_SetConstant(d, "Outgoing",SWIG_From_int(static_cast< int >(meep::Outgoing)));
  SWIG_Python_SetConstant(d, "CONNECT_PHASE",SWIG_From_int(static_cast< int >(meep::CONNECT_PHASE)));
  SWIG_Python_SetConstant(d, "CONNECT_NEGATE",SWIG_From_int(static_cast< int >(meep::CONNECT_NEGATE)));
  SWIG_Python_SetConstant(d, "CONNECT_COPY",SWIG_From_int(static_cast< int >(meep::CONNECT_COPY)));
  SWIG_addvarlink(globals, "NUM_CONNECT_PHASE_TYPES", Swig_var_NUM_CONNECT_PHASE_TYPES_get, Swig_var_NUM_CONNECT_PHASE_TYPES_set);
  SWIG_Python_SetConstant(d, "Periodic",SWIG_From_int(static_cast< int >(meep::Periodic)));
  SWIG_Python_SetConstant(d, "Metallic",SWIG_From_int(static_cast< int >(meep::Metallic)));
  SWIG_Python_SetConstant(d, "Magnetic",SWIG_From_int(static_cast< int >(meep::Magnetic)));
  SWIG_Python_SetConstant(d, "Meep_None",SWIG_From_int(static_cast< int >(meep::None)));
  SWIG_Python_SetConstant(d, "Connecting",SWIG_From_int(static_cast< int >(meep::Connecting)));
  SWIG_Python_SetConstant(d, "Stepping",SWIG_From_int(static_cast< int >(meep::Stepping)));
  SWIG_Python_SetConstant(d, "Boundaries",SWIG_From_int(static_cast< int >(meep::Boundaries)));
  SWIG_Python_SetConstant(d, "MpiAllTime",SWIG_From_int(static_cast< int >(meep::MpiAllTime)));
  SWIG_Python_SetConstant(d, "MpiOneTime",SWIG_From_int(static_cast< int >(meep::MpiOneTime)));
  SWIG_Python_SetConstant(d, "FieldOutput",SWIG_From_int(static_cast< int >(meep::FieldOutput)));
  SWIG_Python_SetConstant(d, "FourierTransforming",SWIG_From_int(static_cast< int >(meep::FourierTransforming)));
  SWIG_Python_SetConstant(d, "MPBTime",SWIG_From_int(static_cast< int >(meep::MPBTime)));
  SWIG_Python_SetConstant(d, "GetFarfieldsTime",SWIG_From_int(static_cast< int >(meep::GetFarfieldsTime)));
  SWIG_Python_SetConstant(d, "Other",SWIG_From_int(static_cast< int >(meep::Other)));
  SWIG_Python_SetConstant(d, "FieldUpdateB",SWIG_From_int(static_cast< int >(meep::FieldUpdateB)));
  SWIG_Python_SetConstant(d, "FieldUpdateH",SWIG_From_int(static_cast< int >(meep::FieldUpdateH)));
  SWIG_Python_SetConstant(d, "FieldUpdateD",SWIG_From_int(static_cast< int >(meep::FieldUpdateD)));
  SWIG_Python_SetConstant(d, "FieldUpdateE",SWIG_From_int(static_cast< int >(meep::FieldUpdateE)));
  SWIG_Python_SetConstant(d, "BoundarySteppingB",SWIG_From_int(static_cast< int >(meep::BoundarySteppingB)));
  SWIG_Python_SetConstant(d, "BoundarySteppingWH",SWIG_From_int(static_cast< int >(meep::BoundarySteppingWH)));
  SWIG_Python_SetConstant(d, "BoundarySteppingPH",SWIG_From_int(static_cast< int >(meep::BoundarySteppingPH)));
  SWIG_Python_SetConstant(d, "BoundarySteppingH",SWIG_From_int(static_cast< int >(meep::BoundarySteppingH)));
  SWIG_Python_SetConstant(d, "BoundarySteppingD",SWIG_From_int(static_cast< int >(meep::BoundarySteppingD)));
  SWIG_Python_SetConstant(d, "BoundarySteppingWE",SWIG_From_int(static_cast< int >(meep::BoundarySteppingWE)));
  SWIG_Python_SetConstant(d, "BoundarySteppingPE",SWIG_From_int(static_cast< int >(meep::BoundarySteppingPE)));
  SWIG_Python_SetConstant(d, "BoundarySteppingE",SWIG_From_int(static_cast< int >(meep::BoundarySteppingE)));
  SWIG_addvarlink(globals, "CYLINDRICAL", Swig_var_CYLINDRICAL_get, Swig_var_CYLINDRICAL_set);
  SWIG_addvarlink(globals, "X_DIR", Swig_var_X_DIR_get, Swig_var_X_DIR_set);
  SWIG_addvarlink(globals, "Y_DIR", Swig_var_Y_DIR_get, Swig_var_Y_DIR_set);
  SWIG_addvarlink(globals, "Z_DIR", Swig_var_Z_DIR_get, Swig_var_Z_DIR_set);
  SWIG_addvarlink(globals, "R_DIR", Swig_var_R_DIR_get, Swig_var_R_DIR_set);
  SWIG_addvarlink(globals, "PHI_DIR", Swig_var_PHI_DIR_get, Swig_var_PHI_DIR_set);
  SWIG_addvarlink(globals, "ALL_SIDES", Swig_var_ALL_SIDES_get, Swig_var_ALL_SIDES_set);
  SWIG_addvarlink(globals, "ALL_DIRECTIONS", Swig_var_ALL_DIRECTIONS_get, Swig_var_ALL_DIRECTIONS_set);
  SWIG_addvarlink(globals, "ENORMOUS", Swig_var_ENORMOUS_get, Swig_var_ENORMOUS_set);
  SWIG_addvarlink(globals, "TINY", Swig_var_TINY_get, Swig_var_TINY_set);
  SWIG_addvarlink(globals, "fragment_stats_tol", Swig_var_fragment_stats_tol_get, Swig_var_fragment_stats_tol_set);
  SWIG_addvarlink(globals, "fragment_stats_maxeval", Swig_var_fragment_stats_maxeval_get, Swig_var_fragment_stats_maxeval_set);
  SWIG_addvarlink(globals, "fragment_stats_resolution", Swig_var_fragment_stats_resolution_get, Swig_var_fragment_stats_resolution_set);
  SWIG_addvarlink(globals, "fragment_stats_dims", Swig_var_fragment_stats_dims_get, Swig_var_fragment_stats_dims_set);
  SWIG_addvarlink(globals, "fragment_stats_geom", Swig_var_fragment_stats_geom_get, Swig_var_fragment_stats_geom_set);
  SWIG_addvarlink(globals, "fragment_stats_dft_data_list", Swig_var_fragment_stats_dft_data_list_get, Swig_var_fragment_stats_dft_data_list_set);
  SWIG_addvarlink(globals, "fragment_stats_pml_1d_vols", Swig_var_fragment_stats_pml_1d_vols_get, Swig_var_fragment_stats_pml_1d_vols_set);
  SWIG_addvarlink(globals, "fragment_stats_pml_2d_vols", Swig_var_fragment_stats_pml_2d_vols_get, Swig_var_fragment_stats_pml_2d_vols_set);
  SWIG_addvarlink(globals, "fragment_stats_pml_3d_vols", Swig_var_fragment_stats_pml_3d_vols_get, Swig_var_fragment_stats_pml_3d_vols_set);
  SWIG_addvarlink(globals, "fragment_stats_absorber_vols", Swig_var_fragment_stats_absorber_vols_get, Swig_var_fragment_stats_absorber_vols_set);
  SWIG_addvarlink(globals, "fragment_stats_extra_materials", Swig_var_fragment_stats_extra_materials_get, Swig_var_fragment_stats_extra_materials_set);
  SWIG_addvarlink(globals, "fragment_stats_split_chunks_evenly", Swig_var_fragment_stats_split_chunks_evenly_get, Swig_var_fragment_stats_split_chunks_evenly_set);
  SWIG_addvarlink(globals, "fragment_stats_eps_averaging", Swig_var_fragment_stats_eps_averaging_get, Swig_var_fragment_stats_eps_averaging_set);
#if PY_VERSION_HEX >= 0x03000000
  return m;
#else
  return;
#endif
}

